lkml.org 
[lkml]   [2008]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 4/6] fs: Introduce a per_cpu nr_inodes
    From
    Date
    Peter Zijlstra <a.p.zijlstra@chello.nl> writes:
    >>
    >> +int get_nr_inodes(void)
    >> +{
    >> + int cpu;
    >> + int counter = 0;
    >> +
    >> + for_each_possible_cpu(cpu)
    >> + counter += per_cpu(nr_inodes, cpu);
    >> + if (counter < 0)
    >> + counter = 0;
    >> + return counter;
    >> +}
    >
    > It would be good to get a cpu hotplug handler here and move to
    > for_each_online_cpu(). People are wanting distro's to be build with
    > NR_CPUS=4096.

    Doesn't matter, possible cpus is always only set to what the
    machine supports.

    -Andi
    --
    ak@linux.intel.com


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