[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1421814703-1869-1-git-send-email-sasha.levin@oracle.com>
Date: Tue, 20 Jan 2015 23:31:43 -0500
From: Sasha Levin <sasha.levin@...cle.com>
To: linux-kernel@...r.kernel.org
Cc: iamjoonsoo.kim@....com, cl@...ux.com, brouer@...hat.com,
akpm@...ux-foundation.org, Sasha Levin <sasha.levin@...cle.com>
Subject: [PATCH] mm/slub: use unchecked percpu access within preemptible sections
Commit "mm/slub: optimize alloc/free fastpath by removing preemption on/off"
has added access to percpu memory while the code is preemptible.
While those accesses are okay, this creates a huge amount of warnings from
the code that checks for that.
Signed-off-by: Sasha Levin <sasha.levin@...cle.com>
---
mm/slub.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 907fabe..9b72b9c 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2431,8 +2431,8 @@ redo:
* to check if it is matched or not.
*/
do {
- tid = this_cpu_read(s->cpu_slab->tid);
- c = this_cpu_ptr(s->cpu_slab);
+ tid = raw_cpu_read(s->cpu_slab->tid);
+ c = raw_cpu_ptr(s->cpu_slab);
} while (IS_ENABLED(CONFIG_PREEMPT) && unlikely(tid != c->tid));
/*
@@ -2700,8 +2700,8 @@ redo:
* during the cmpxchg then the free will succedd.
*/
do {
- tid = this_cpu_read(s->cpu_slab->tid);
- c = this_cpu_ptr(s->cpu_slab);
+ tid = raw_cpu_read(s->cpu_slab->tid);
+ c = raw_cpu_ptr(s->cpu_slab);
} while (IS_ENABLED(CONFIG_PREEMPT) && unlikely(tid != c->tid));
/* Same with comment on barrier() in slab_alloc_node() */
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists