percpu_counter: FBC_BATCH should be a variable
Eric Dumazet authored

For NR_CPUS >= 16 values, FBC_BATCH is 2*NR_CPUS

Considering more and more distros are using high NR_CPUS values, it makes
sense to use a more sensible value for FBC_BATCH, and get rid of NR_CPUS.

A sensible value is 2*num_online_cpus(), with a minimum value of 32 (This
minimum value helps branch prediction in __percpu_counter_add())

We already have a hotcpu notifier, so we can adjust FBC_BATCH dynamically.

We rename FBC_BATCH to percpu_counter_batch since its not a constant
anymore.
Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
179f7ebf
Name Last commit Last update
..
Kconfig fs/Kconfig: move ext2, ext3, ext4, JBD, JBD2 out
Makefile ext4: Rename ext4dev to ext4
acl.c ext4: Cleanup whitespace and other miscellaneous style issues
acl.h ext4: Rename ext4dev to ext4
balloc.c Merge branch 'next' into for-linus
bitmap.c ext4: Fix whitespace checkpatch warnings/errors
dir.c ext4: Fix duplicate entries returned from getdents() system call
ext4.h percpu_counter: FBC_BATCH should be a variable
ext4_extents.h Hook ext4 to the vfs fiemap interface.
ext4_i.h ext4: Rename ext4dev to ext4
ext4_jbd2.c ext4: move headers out of include/linux
ext4_jbd2.h ext4: journal credits calulation cleanup and fix for non-extent writepage
ext4_sb.h fs: introduce bgl_lock_ptr()
extents.c Hook ext4 to the vfs fiemap interface.
file.c ext4: Rename ext4dev to ext4
fsync.c ext4: Add debugging markers that can be used by systemtap
group.h ext4: Rename read_block_bitmap() to ext4_read_block_bitmap()
hash.c ext4: Fix whitespace checkpatch warnings/errors
ialloc.c nfsd race fixes: ext4
inode.c percpu_counter: FBC_BATCH should be a variable
ioctl.c ext4: add checks for errors from jbd2
mballoc.c ext4: fix missing ext4_unlock_group in error path
mballoc.h ext4: Replace hackish ext4_mb_poll_new_transaction with commit callback
migrate.c ext4: elevate write count for migrate ioctl
namei.c fs: symlink write_begin allocation context fix
namei.h
resize.c
super.c
symlink.c
xattr.c
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c