lkml.org 
[lkml]   [2011]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFD 1/9] Change cpustat fields to an array.
From
Date
On Wed, 2011-09-28 at 12:13 -0300, Glauber Costa wrote:
> On 09/27/2011 06:00 PM, Peter Zijlstra wrote:
> > On Fri, 2011-09-23 at 19:20 -0300, Glauber Costa wrote:
> >> /* Must have preemption disabled for this to be meaningful. */
> >> -#define kstat_this_cpu __get_cpu_var(kstat)
> >> +#define kstat_this_cpu this_cpu_ptr(task_group_kstat(current))
> >
> > This just lost you a debug check, the former would whinge when called
> > without preemption, the new one wont. Its part of the this_cpu feature
> > set to make debugging impossible.
>
> Why is that?
>
> from percpu.h:
> #define __get_cpu_var(var) (*this_cpu_ptr(&(var)))
>
> So I don't get it.

Ah, my bad, its not actually part of the this_cpu*() api, what wonderful
mess that is.


\
 
 \ /
  Last update: 2011-09-28 17:27    [W:0.069 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site