lkml.org 
[lkml]   [2008]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6] Unified trace buffer

On Fri, 26 Sep 2008, Mike Travis wrote:
> Steven Rostedt wrote:
> >
> > But to lay the ground work, I set a buffers->cpumask to be that of all the
> > cpus with buffers allocated. For now that mask is set to cpu_possible_map.
> > Since num_possible_cpus() is defined as cpus_weight_nr(cpu_possible_map)
> > I figured that was the better choice.
> >
> > -- Steve
>
> One problem though, it's *theoretically* possible for num_possible to be
> less than nr_cpu_ids and a cpu index may extend past the end of your
> allocated array. This would happen if the cpu indices are allocated
> some other way than as each cpu is discovered. For example, a system
> might want a group of cpus in one section (say by node, or socket) and
> then a hole in the cpu_possible_map until the next group. nr_cpu_ids
> is guaranteed to be the highest possible cpu + 1.

Thanks for the explanation. I'll change buffer->cpus to be set to
nr_cpu_ids.

-- Steve



\
 
 \ /
  Last update: 2008-09-27 02:55    [W:0.223 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site