slub: use raw_cpu_inc for incrementing statistics
authorChristoph Lameter <cl@linux.com>
Mon, 7 Apr 2014 22:39:42 +0000 (15:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 7 Apr 2014 23:36:14 +0000 (16:36 -0700)
commit88da03a67674bcd6e9ecf18a0a182cf1303056ba
treef822c90ff7a8e62e6d7c3c82854b510786e7222b
parent3ed66e910c91eb914b5c1f2d434538fe68bb8a56
slub: use raw_cpu_inc for incrementing statistics

Statistics are not critical to the operation of the allocation but
should also not cause too much overhead.

When __this_cpu_inc is altered to check if preemption is disabled this
triggers.  Use raw_cpu_inc to avoid the checks.  Using this_cpu_ops may
cause interrupt disable/enable sequences on various arches which may
significantly impact allocator performance.

[akpm@linux-foundation.org: add comment]
Signed-off-by: Christoph Lameter <cl@linux.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c