[merged] slub-use-raw_cpu_inc-for-incrementing-statistics.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: [merged] slub-use-raw_cpu_inc-for-incrementing-statistics.patch removed from -mm tree
To: cl@xxxxxxxxx,fengguang.wu@xxxxxxxxx,penberg@xxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Tue, 08 Apr 2014 14:47:45 -0700


The patch titled
     Subject: slub: use raw_cpu_inc for incrementing statistics
has been removed from the -mm tree.  Its filename was
     slub-use-raw_cpu_inc-for-incrementing-statistics.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Christoph Lameter <cl@xxxxxxxxx>
Subject: 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@xxxxxxxxxxxxxxxxxxxx: add comment]
Signed-off-by: Christoph Lameter <cl@xxxxxxxxx>
Cc: Fengguang Wu <fengguang.wu@xxxxxxxxx>
Cc: Pekka Enberg <penberg@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/slub.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff -puN mm/slub.c~slub-use-raw_cpu_inc-for-incrementing-statistics mm/slub.c
--- a/mm/slub.c~slub-use-raw_cpu_inc-for-incrementing-statistics
+++ a/mm/slub.c
@@ -224,7 +224,11 @@ static inline void memcg_propagate_slab_
 static inline void stat(const struct kmem_cache *s, enum stat_item si)
 {
 #ifdef CONFIG_SLUB_STATS
-	__this_cpu_inc(s->cpu_slab->stat[si]);
+	/*
+	 * The rmw is racy on a preemptible kernel but this is acceptable, so
+	 * avoid this_cpu_add()'s irq-disable overhead.
+	 */
+	raw_cpu_inc(s->cpu_slab->stat[si]);
 #endif
 }
 
_

Patches currently in -mm which might be from cl@xxxxxxxxx are

origin.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux