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:
    > >> The other thing to consider is using a percpu variable.
    > >
    > > This structure is allocated on request.
    > >
    > > -- Steve
    >
    >
    > Ahh, then it would need the yet to be added cpu_alloc() from Christoph.

    We can always change this later.

    >
    > Your best bet then is to allocate based on nr_cpu_ids.

    Actually in this case I chose num_possible_cpus(). Reason being is that
    later I may add an interface to allow the user to select which CPUs they
    want to trace, and this will only allocate a subset of CPU buffers.
    (not going to implement that in the first release).

    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



    \
     
     \ /
      Last update: 2008-09-27 02:21    [W:0.020 / U:29.280 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site