linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/slub.c: replace cpu_slab->partial with wrapped APIs
@ 2020-02-17 15:04 qiwuchen55
  2020-02-26 18:15 ` Vlastimil Babka
  0 siblings, 1 reply; 3+ messages in thread
From: qiwuchen55 @ 2020-02-17 15:04 UTC (permalink / raw)
  To: cl, penberg, rientjes, iamjoonsoo.kim, akpm; +Cc: linux-mm, chenqiwu

From: chenqiwu <chenqiwu@xiaomi.com>

There are slub_percpu_partial() and slub_set_percpu_partial()
APIs to wrap kmem_cache->cpu_partial. This patch will use the
two to replace cpu_slab->partial in slub code.

Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
---
 mm/slub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 17dc00e..15bb0ba 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2207,11 +2207,11 @@ static void unfreeze_partials(struct kmem_cache *s,
 	struct kmem_cache_node *n = NULL, *n2 = NULL;
 	struct page *page, *discard_page = NULL;
 
-	while ((page = c->partial)) {
+	while ((page = slub_percpu_partial(c))) {
 		struct page new;
 		struct page old;
 
-		c->partial = page->next;
+		slub_set_percpu_partial(c, page);
 
 		n2 = get_node(s, page_to_nid(page));
 		if (n != n2) {
-- 
1.9.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-26 18:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 15:04 [PATCH] mm/slub.c: replace cpu_slab->partial with wrapped APIs qiwuchen55
2020-02-26 18:15 ` Vlastimil Babka
2020-02-26 18:26   ` Christopher Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox