diff options
| -rw-r--r-- | mm/slub.c | 12 |
1 files changed, 7 insertions, 5 deletions
| @@ -1869,12 +1869,14 @@ redo: | |||
| 1869 | /* | 1869 | /* |
| 1870 | * Unfreeze all the cpu partial slabs. | 1870 | * Unfreeze all the cpu partial slabs. |
| 1871 | * | 1871 | * |
| 1872 | * This function must be called with interrupt disabled. | 1872 | * This function must be called with interrupts disabled |
| 1873 | * for the cpu using c (or some other guarantee must be there | ||
| 1874 | * to guarantee no concurrent accesses). | ||
| 1873 | */ | 1875 | */ |
| 1874 | static void unfreeze_partials(struct kmem_cache *s) | 1876 | static void unfreeze_partials(struct kmem_cache *s, |
| 1877 | struct kmem_cache_cpu *c) | ||
| 1875 | { | 1878 | { |
| 1876 | struct kmem_cache_node *n = NULL, *n2 = NULL; | 1879 | struct kmem_cache_node *n = NULL, *n2 = NULL; |
| 1877 | struct kmem_cache_cpu *c = this_cpu_ptr(s->cpu_slab); | ||
| 1878 | struct page *page, *discard_page = NULL; | 1880 | struct page *page, *discard_page = NULL; |
| 1879 | 1881 | ||
| 1880 | while ((page = c->partial)) { | 1882 | while ((page = c->partial)) { |
| @@ -1960,7 +1962,7 @@ static int put_cpu_partial(struct kmem_cache *s, struct page *page, int drain) | |||
| 1960 | * set to the per node partial list. | 1962 | * set to the per node partial list. |
| 1961 | */ | 1963 | */ |
| 1962 | local_irq_save(flags); | 1964 | local_irq_save(flags); |
| 1963 | unfreeze_partials(s); | 1965 | unfreeze_partials(s, this_cpu_ptr(s->cpu_slab)); |
| 1964 | local_irq_restore(flags); | 1966 | local_irq_restore(flags); |
| 1965 | oldpage = NULL; | 1967 | oldpage = NULL; |
| 1966 | pobjects = 0; | 1968 | pobjects = 0; |
| @@ -2003,7 +2005,7 @@ static inline void __flush_cpu_slab(struct kmem_cache *s, int cpu) | |||
| 2003 | if (c->page) | 2005 | if (c->page) |
| 2004 | flush_slab(s, c); | 2006 | flush_slab(s, c); |
| 2005 | 2007 | ||
| 2006 | unfreeze_partials(s); | 2008 | unfreeze_partials(s, c); |
| 2007 | } | 2009 | } |
| 2008 | } | 2010 | } |
| 2009 | 2011 | ||
