aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fs-writeback.c
diff options
context:
space:
mode:
authorWen Yang <[email protected]>2023-04-25 15:52:35 +0000
committerAndrew Morton <[email protected]>2023-06-09 23:25:14 +0000
commit8b9167cd9ef039d95b65ef9600a7507795173121 (patch)
treedd16bf5e8191cb4011b78a36ee773e501487075f /fs/fs-writeback.c
parentmemcg: dump memory.stat during cgroup OOM for v1 (diff)
downloadkernel-8b9167cd9ef039d95b65ef9600a7507795173121.tar.gz
kernel-8b9167cd9ef039d95b65ef9600a7507795173121.zip
mm: compaction: optimize compact_memory to comply with the admin-guide
For the /proc/sys/vm/compact_memory file, the admin-guide states: When 1 is written to the file, all zones are compacted such that free memory is available in contiguous blocks where possible. This can be important for example in the allocation of huge pages although processes will also directly compact memory as required But it was not strictly followed, writing any value would cause all zones to be compacted. It has been slightly optimized to comply with the admin-guide. Enforce the 1 on the unlikely chance that the sysctl handler is ever extended to do something different. Commit ef4984384172 ("mm/compaction: remove unused variable sysctl_compact_memory") has also been optimized a bit here, as the declaration in the external header file has been eliminated, and sysctl_compact_memory also needs to be verified. [[email protected]: add __read_mostly, per Mel] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Wen Yang <[email protected]> Acked-by: Mel Gorman <[email protected]> Cc: Oscar Salvador <[email protected]> Cc: William Lam <[email protected]> Cc: Pintu Kumar <[email protected]> Cc: Fu Wei <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'fs/fs-writeback.c')
0 files changed, 0 insertions, 0 deletions