diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -2500,15 +2500,11 @@ int kmem_cache_shrink(struct kmem_cache *s) | |||
2500 | slab_unlock(page); | 2500 | slab_unlock(page); |
2501 | discard_slab(s, page); | 2501 | discard_slab(s, page); |
2502 | } else { | 2502 | } else { |
2503 | if (n->nr_partial > MAX_PARTIAL) | 2503 | list_move(&page->lru, |
2504 | list_move(&page->lru, | 2504 | slabs_by_inuse + page->inuse); |
2505 | slabs_by_inuse + page->inuse); | ||
2506 | } | 2505 | } |
2507 | } | 2506 | } |
2508 | 2507 | ||
2509 | if (n->nr_partial <= MAX_PARTIAL) | ||
2510 | goto out; | ||
2511 | |||
2512 | /* | 2508 | /* |
2513 | * Rebuild the partial list with the slabs filled up most | 2509 | * Rebuild the partial list with the slabs filled up most |
2514 | * first and the least used slabs at the end. | 2510 | * first and the least used slabs at the end. |
@@ -2516,7 +2512,6 @@ int kmem_cache_shrink(struct kmem_cache *s) | |||
2516 | for (i = s->objects - 1; i >= 0; i--) | 2512 | for (i = s->objects - 1; i >= 0; i--) |
2517 | list_splice(slabs_by_inuse + i, n->partial.prev); | 2513 | list_splice(slabs_by_inuse + i, n->partial.prev); |
2518 | 2514 | ||
2519 | out: | ||
2520 | spin_unlock_irqrestore(&n->list_lock, flags); | 2515 | spin_unlock_irqrestore(&n->list_lock, flags); |
2521 | } | 2516 | } |
2522 | 2517 | ||