Re: [PATCH 03/19] fs: Convert nr_inodes and nr_unused to per-cpu counters

Peter Zijlstra
2010-10-16T17:26:58Z

On Sat, 2010-10-16 at 12:27 +0200, Eric Dumazet wrote:
>
> In cases you mention, you want a precise count (aka
> percpu_counter_sum_positive()), not the approximate one (aka
> percpu_counter_read_positive()).
>
> The only difference is then the possible/online cpu loop difference.
>
In either case, SGI is screwed, doing millions of for_each_*_cpu() loops
per second isn't going to work for them.

fwiw, for_each_*_cpu() takes longer than a single jiffy tick on those
machines.