diff options
author | Charan Teja Reddy <[email protected]> | 2021-09-02 14:59:56 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2021-09-03 09:58:17 -0700 |
commit | e1e92bfa3825b72be4957f9fef267b3106d20aa6 (patch) | |
tree | 8d99328e0d396d826ba6ade4a4414b1452e6229d /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 1399af7e54896c774d67f1c1acc491b07149421d (diff) |
mm: compaction: optimize proactive compaction deferrals
Vlastimil Babka figured out that when fragmentation score didn't go down
across the proactive compaction i.e. when no progress is made, next wake
up for proactive compaction is deferred for 1 << COMPACT_MAX_DEFER_SHIFT,
i.e. 64 times, with each wakeup interval of
HPAGE_FRAG_CHECK_INTERVAL_MSEC(=500). In each of this wakeup, it just
decrement 'proactive_defer' counter and goes sleep i.e. it is getting
woken to just decrement a counter.
The same deferral time can also achieved by simply doing the
HPAGE_FRAG_CHECK_INTERVAL_MSEC << COMPACT_MAX_DEFER_SHIFT thus unnecessary
wakeup of kcompact thread is avoided thus also removes the need of
'proactive_defer' thread counter.
[[email protected]: tweak comment]
Link: https://lore.kernel.org/linux-fsdevel/[email protected]/
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Charan Teja Reddy <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Reviewed-by: Khalid Aziz <[email protected]>
Acked-by: David Rientjes <[email protected]>
Cc: Nitin Gupta <[email protected]>
Cc: Vinayak Menon <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions