[PATCH] mm/slub.c: replace cpu_slab->partial with wrapped APIs

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

 



From: chenqiwu <chenqiwu@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux