Commit baea249
mm/page_alloc: batch page freeing in decay_pcp_high
commit fc4b909 upstream.
It is possible for pcp->count - pcp->high to exceed pcp->batch by a lot.
When this happens, we should perform batching to ensure that
free_pcppages_bulk isn't called with too many pages to free at once and
starve out other threads that need the pcp or zone lock.
Since we are still only freeing the difference between the initial
pcp->count and pcp->high values, there should be no change to how many
pages are freed.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Joshua Hahn <[email protected]>
Suggested-by: Chris Mason <[email protected]>
Suggested-by: Andrew Morton <[email protected]>
Co-developed-by: Johannes Weiner <[email protected]>
Reviewed-by: Vlastimil Babka <[email protected]>
Cc: Brendan Jackman <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: SeongJae Park <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Zi Yan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Stable-dep-of: 038a102 ("mm/page_alloc: prevent pcp corruption with SMP=n")
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 2a72a8d commit baea249
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2554 | 2554 | | |
2555 | 2555 | | |
2556 | 2556 | | |
2557 | | - | |
| 2557 | + | |
2558 | 2558 | | |
2559 | 2559 | | |
2560 | 2560 | | |
| |||
2572 | 2572 | | |
2573 | 2573 | | |
2574 | 2574 | | |
2575 | | - | |
| 2575 | + | |
| 2576 | + | |
2576 | 2577 | | |
2577 | | - | |
| 2578 | + | |
2578 | 2579 | | |
2579 | 2580 | | |
| 2581 | + | |
| 2582 | + | |
2580 | 2583 | | |
2581 | 2584 | | |
2582 | 2585 | | |
| |||
0 commit comments