Yang, Xiaowei
2009-Mar-09 07:46 UTC
[Xen-devel] [PATCH] use atomic_t type for system wide credit scheduler statistics
Current code is not SMP safe. Use atomic_t type instead. Thanks, xiaowei _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Mar-09 08:09 UTC
Re: [Xen-devel] [PATCH] use atomic_t type for system wide credit scheduler statistics
Not while csched stats are enabled by default. They get cranked all over the place. How much does this race matter? We probably just lose a few increments? -- Keir On 09/03/2009 07:46, "Yang, Xiaowei" <xiaowei.yang@intel.com> wrote:> Current code is not SMP safe. Use atomic_t type instead. > > Thanks, > xiaowei_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yang, Xiaowei
2009-Mar-09 08:30 UTC
Re: [Xen-devel] [PATCH] use atomic_t type for system wide credit scheduler statistics
Keir Fraser wrote:> Not while csched stats are enabled by default. They get cranked all over the > place. How much does this race matter? We probably just lose a few > increments?Yes. The higher frequency the count is updated, the more increments lost can we see - comparing to atomic version, counts like "vcpu_check" and "scheduele" lose increments very obviously due to race. Thanks, xiaowei _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Mar-09 08:36 UTC
Re: [Xen-devel] [PATCH] use atomic_t type for system wide credit scheduler statistics
On 09/03/2009 08:30, "Yang, Xiaowei" <xiaowei.yang@intel.com> wrote:> Keir Fraser wrote: >> Not while csched stats are enabled by default. They get cranked all over the >> place. How much does this race matter? We probably just lose a few >> increments? > > Yes. The higher frequency the count is updated, the more increments lost > can we see - comparing to atomic version, counts like "vcpu_check" and > "scheduele" lose increments very obviously due to race.The best thing to do would be to move the stats into perfc_defn.h, don''t you think? The CSCHED_* macro wrappers could be kept but wrap the existing common mechanism for perf counters. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yang, Xiaowei
2009-Mar-09 10:04 UTC
Re: [Xen-devel] [PATCH] use atomic_t type for system wide credit scheduler statistics
Keir Fraser wrote:> On 09/03/2009 08:30, "Yang, Xiaowei" <xiaowei.yang@intel.com> wrote: > >> Keir Fraser wrote: >>> Not while csched stats are enabled by default. They get cranked all over the >>> place. How much does this race matter? We probably just lose a few >>> increments? >> Yes. The higher frequency the count is updated, the more increments lost >> can we see - comparing to atomic version, counts like "vcpu_check" and >> "scheduele" lose increments very obviously due to race. > > The best thing to do would be to move the stats into perfc_defn.h, don''t you > think? The CSCHED_* macro wrappers could be kept but wrap the existing > common mechanism for perf counters. >Agree. updated version attached. Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel