Commit 1eb5ac64 authored by Nick Piggin's avatar Nick Piggin Committed by Pekka Enberg
Browse files

mm: SLUB fix reclaim_state

SLUB does not correctly account reclaim_state.reclaimed_slab, so it will
break memory reclaim. Account it like SLAB does.

Cc: Matt Mackall <>
Acked-by: default avatarChristoph Lameter <>
Signed-off-by: default avatarNick Piggin <>
Signed-off-by: default avatarPekka Enberg <>
parent ce8a7424
......@@ -9,6 +9,7 @@
#include <linux/mm.h>
#include <linux/swap.h> /* struct reclaim_state */
#include <linux/module.h>
#include <linux/bit_spinlock.h>
#include <linux/interrupt.h>
......@@ -1170,6 +1171,8 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
if (current->reclaim_state)
current->reclaim_state->reclaimed_slab += pages;
__free_pages(page, order);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment