lkml.org 
[lkml]   [2008]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/8] cpumask: convert kernel trace functions

On Fri, 19 Dec 2008, Mike Travis wrote:
> >
> >
> > How does this save memory if we just allocate a cpumask var everytime
> > we allocate a ring buffer? Is cpumask_var_t a mask of possible CPUS and
> > not NR_CPUS?
> >
> > Otherwise, I see this as just adding one extra pointer.
> >
> > -- Steve
>
> Hi Steve,
>
> Yes, eventually, the cpumask_var_t will be allocated based on cpumask_size()
> which will become BITS_TO_LONG(nr_cpu_ids) instead of BITS_TO_LONGS(NR_CPUS)
> as soon as the kernel becomes "cpumask" clean. (clean being that it ignores
> all bits >= nr_cpu_ids.)
>
> Note that on small NR_CPUS count systems, cpumask_var_t is a static array
> and no allocation happens, so it only kicks in when CONFIG_CPUMASK_OFFSTACK=y.

OK, that explains a lot. Thanks for the explanation.

-- Steve



\
 
 \ /
  Last update: 2008-12-19 18:05    [W:0.391 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site