mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
vmscan: have kswapd sleep for a short interval and double check it should be asleep
After kswapd balances all zones in a pgdat, it goes to sleep. In the event of no IO congestion, kswapd can go to sleep very shortly after the high watermark was reached. If there are a constant stream of allocations from parallel processes, it can mean that kswapd went to sleep too quickly and the high watermark is not being maintained for sufficient length time. This patch makes kswapd go to sleep as a two-stage process. It first tries to sleep for HZ/10. If it is woken up by another process or the high watermark is no longer met, it's considered a premature sleep and kswapd continues work. Otherwise it goes fully to sleep. This adds more counters to distinguish between fast and slow breaches of watermarks. A "fast" premature sleep is one where the low watermark was hit in a very short time after kswapd going to sleep. A "slow" premature sleep indicates that the high watermark was breached after a very short interval. Signed-off-by: Mel Gorman <[email protected]> Cc: Frans Pop <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Christoph Lameter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
273f047e36
commit
f50de2d381
3 changed files with 45 additions and 2 deletions
|
|
@ -683,6 +683,8 @@ static const char * const vmstat_text[] = {
|
|||
"slabs_scanned",
|
||||
"kswapd_steal",
|
||||
"kswapd_inodesteal",
|
||||
"kswapd_slept_prematurely_fast",
|
||||
"kswapd_slept_prematurely_slow",
|
||||
"pageoutrun",
|
||||
"allocstall",
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue