diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2007-05-06 14:49:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 12:12:52 -0700 |
commit | 364fbb29a0105863d76a1f7bbc01783a4af30a75 (patch) | |
tree | 065828ff023a95daa3b60abbb166e71f10336a64 /fs/hfs/part_tbl.c | |
parent | 6ce745ed39d35f9d547d00d406db2be7c6c175b3 (diff) | |
download | op-kernel-dev-364fbb29a0105863d76a1f7bbc01783a4af30a75.zip op-kernel-dev-364fbb29a0105863d76a1f7bbc01783a4af30a75.tar.gz |
SLAB: use num_possible_cpus() in enable_cpucache()
The existing comment in mm/slab.c is *perfect*, so I reproduce it :
/*
* CPU bound tasks (e.g. network routing) can exhibit cpu bound
* allocation behaviour: Most allocs on one cpu, most free operations
* on another cpu. For these cases, an efficient object passing between
* cpus is necessary. This is provided by a shared array. The array
* replaces Bonwick's magazine layer.
* On uniprocessor, it's functionally equivalent (but less efficient)
* to a larger limit. Thus disabled by default.
*/
As most shiped linux kernels are now compiled with CONFIG_SMP, there is no way
a preprocessor #if can detect if the machine is UP or SMP. Better to use
num_possible_cpus().
This means on UP we allocate a 'size=0 shared array', to be more efficient.
Another patch can later avoid the allocations of 'empty shared arrays', to
save some memory.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfs/part_tbl.c')
0 files changed, 0 insertions, 0 deletions