android_kernel_xiaomi_sm8350/lib
Eric Dumazet 179f7ebff6 percpu_counter: FBC_BATCH should be a variable
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: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:13 -08:00
..
lzo lzo: use get/put_unaligned_* helpers 2008-07-25 10:53:26 -07:00
reed_solomon lib: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:17:17 -04:00
zlib_deflate
zlib_inflate
.gitignore
argv_split.c
audit.c
bcd.c rtc: BCD codeshrink 2008-07-24 10:47:33 -07:00
bitmap.c Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb 2008-10-23 08:20:34 -07:00
bitrev.c lib: export bitrev16 2008-06-06 11:29:10 -07:00
bug.c allow bug table entries to use relative pointers (and use it on x86-64) 2008-12-16 18:40:32 +01:00
bust_spinlocks.c oops handling: ensure that any oops is flushed to the mtdoops console 2009-01-06 15:59:11 -08:00
check_signature.c
cmdline.c generic, memparse(): constify argument 2008-07-28 15:05:23 +02:00
cpumask.c cpumask: zero extra bits in alloc_cpumask_var_node 2009-01-01 10:12:30 +10:30
crc7.c
crc16.c
crc32.c
crc32defs.h
crc-ccitt.c
crc-itu-t.c
crc-t10dif.c [SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRC 2008-07-12 08:22:32 -05:00
ctype.c
debug_locks.c debug_locks: set oops_in_progress if we will log messages. 2008-08-01 10:46:43 +02:00
debugobjects.c debugobjects: add boot parameter default value 2008-11-26 10:07:06 +01:00
dec_and_lock.c
devres.c [POWERPC] devres: Add devm_ioremap_prot() 2008-05-05 16:47:14 +10:00
div64.c add an inlined version of iter_div_u64_rem 2008-06-12 10:47:58 +02:00
dump_stack.c
dynamic_printk.c driver core: add newlines to debugging enabled/disabled messages 2008-12-17 11:23:07 -08:00
extable.c
fault-inject.c Remove remaining unwinder code 2009-01-06 15:59:11 -08:00
find_last_bit.c bitmap: find_last_bit() 2009-01-01 10:12:19 +10:30
find_next_bit.c bitops: remove "optimizations" 2008-04-29 08:11:16 -07:00
gen_crc32table.c
genalloc.c
halfmd4.c
hexdump.c lib: create common ascii hex array 2008-05-14 19:11:14 -07:00
hweight.c
idr.c lib/idr.c: Fix bug introduced by RCU fix 2008-12-10 13:34:33 -08:00
inflate.c inflate: refactor inflate malloc code 2008-07-25 10:53:28 -07:00
int_sqrt.c
iomap_copy.c
iomap.c Use WARN() in lib/ 2008-07-26 12:00:07 -07:00
iommu-helper.c introduce generic iommu_num_pages function 2008-10-16 11:21:33 -07:00
ioremap.c
irq_regs.c
is_single_threaded.c CRED: Rename is_single_threaded() to is_wq_single_threaded() 2008-11-14 10:39:21 +11:00
kasprintf.c
Kconfig Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-02 11:44:09 -08:00
Kconfig.debug Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 2008-12-30 17:28:09 -08:00
Kconfig.kgdb kgdb: remove the requirement for CONFIG_FRAME_POINTER 2008-08-01 08:39:34 -05:00
kernel_lock.c BKL: revert back to the old spinlock implementation 2008-05-10 20:58:02 -07:00
klist.c klist: don't iterate over deleted entries 2008-10-09 08:56:04 +02:00
kobject_uevent.c Use WARN() in lib/ 2008-07-26 12:00:07 -07:00
kobject.c kobject: Cleanup kobject_rename and !CONFIG_SYSFS 2008-10-16 09:24:52 -07:00
kref.c
libcrc32c.c libcrc32c: Fix "crc32c undefined" compilation error 2008-12-25 11:01:42 +11:00
list_debug.c list debugging: use WARN() instead of BUG() 2008-07-25 10:53:29 -07:00
lmb.c lmb: Fix reserved region handling in lmb_enforce_memory_limit(). 2008-08-15 19:57:57 -07:00
locking-selftest-hardirq.h
locking-selftest-mutex.h
locking-selftest-rlock-hardirq.h
locking-selftest-rlock-softirq.h
locking-selftest-rlock.h
locking-selftest-rsem.h
locking-selftest-softirq.h
locking-selftest-spin-hardirq.h
locking-selftest-spin-softirq.h
locking-selftest-spin.h
locking-selftest-wlock-hardirq.h
locking-selftest-wlock-softirq.h
locking-selftest-wlock.h
locking-selftest-wsem.h
locking-selftest.c
Makefile bitmap: find_last_bit() 2009-01-01 10:12:19 +10:30
parser.c vfs: Use const for kernel parser table 2008-10-13 10:10:37 -07:00
percpu_counter.c percpu_counter: FBC_BATCH should be a variable 2009-01-06 15:59:13 -08:00
plist.c Use WARN() in lib/ 2008-07-26 12:00:07 -07:00
prio_heap.c lib: fix sparse shadowed variable warning 2009-01-06 15:59:11 -08:00
prio_tree.c
proportions.c lib: proportions.c trivial sparse lock annotation 2009-01-06 15:59:11 -08:00
radix-tree.c lib: radix_tree.c make percpu variable static 2009-01-06 15:59:11 -08:00
random32.c random32: seeding improvement 2008-07-30 16:29:19 -07:00
ratelimit.c __ratelimit() cpu flags can't be static 2008-07-28 16:30:20 -07:00
rbtree.c
reciprocal_div.c
rwsem-spinlock.c
rwsem.c
scatterlist.c lib/scatterlist.c: fix kunmap() argument in sg_miter_stop() 2008-11-19 18:49:58 -08:00
sha1.c
show_mem.c lib: generic show_mem() 2008-07-26 12:00:10 -07:00
smp_processor_id.c cpumask: change cpumask_of_cpu_ptr to use new cpumask_of_cpu 2008-07-26 16:40:33 +02:00
sort.c
spinlock_debug.c
string_helpers.c [SCSI] lib: string_get_size(): don't hang on zero; no decimals on exact 2008-10-23 11:42:20 -05:00
string.c Add a new sysfs_streq() string comparison function 2008-05-01 08:03:59 -07:00
swiotlb.c swiotlb: Don't include linux/swiotlb.h twice in lib/swiotlb.c 2009-01-04 12:25:16 +01:00
syscall.c task_current_syscall 2008-07-26 12:00:10 -07:00
textsearch.c remove CONFIG_KMOD from lib 2008-07-22 19:24:31 +10:00
ts_bm.c textsearch: ts_bm: support case insensitive searching in Boyer-Moore algorithm 2008-07-08 02:37:54 -07:00
ts_fsm.c textsearch: ts_fsm: return error on request for case insensitive search 2008-07-08 02:38:27 -07:00
ts_kmp.c textsearch: ts_kmp: support case insensitive searching in Knuth-Morris-Pratt algorithm 2008-07-08 02:38:09 -07:00
vsprintf.c strict_strto* is not strict enough 2009-01-06 15:59:12 -08:00