Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm: correct page->pfmemalloc to fix deactivate_slab regression
Commit cfd19c5 ("mm: only set page->pfmemalloc when ALLOC_NO_WATERMARKS was used") tried to narrow down page->pfmemalloc setting, but it missed some places the pfmemalloc should be set. So, in __slab_alloc, the unalignment pfmemalloc and ALLOC_NO_WATERMARKS cause incorrect deactivate_slab() on our core2 server: 64.73% fio [kernel.kallsyms] [k] _raw_spin_lock | --- _raw_spin_lock | |---0.34%-- deactivate_slab | __slab_alloc | kmem_cache_alloc | | That causes our fio sync write performance to have a 40% regression. Move the checking in get_page_from_freelist() which resolves this issue. Signed-off-by: Alex Shi <[email protected]> Acked-by: Mel Gorman <[email protected]> Cc: David Miller <[email protected] Cc: Peter Zijlstra <[email protected]> Tested-by: Eric Dumazet <[email protected]> Tested-by: Sage Weil <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information