mm: compaction: move compaction sysctl to its own file
Subsystems (4)
PATCH v8 1/2 mm: compaction: move compaction sysctl to its own file
From: Minghao Chi <[email protected]>
This moves all compaction sysctls to its own file.
Move sysctl to where the functionality truly belongs to improve readability, reduce merge conflicts, and facilitate maintenance.
I use x86_defconfig and linux-next-20230327 branch
$ make defconfig;make all -jn CONFIG_COMPACTION=y
add/remove: 1/0 grow/shrink: 1/1 up/down: 350/-256 (94)
Function old new delta vm_compaction - 320 +320 kcompactd_init 180 210 +30
vm_table 2112 1856 -256
Total: Before=21119987, After=21120081, chg +0.00%
Despite the addition of 94 bytes the patch still seems a worthwile cleanup.
--- include/linux/compaction.h | 7 ---- kernel/sysctl.c | 59 -------------------------- mm/compaction.c | 84 ++++++++++++++++++++++++++++++++------ 3 files changed, 72 insertions(+), 78 deletions(-)
include/linux/compaction.h +0 -7
@@ -81,13 +81,6 @@ static inline unsigned long compact_gap(unsigned int order) }#ifdef CONFIG_COMPACTION -extern unsigned int sysctl_compaction_proactiveness; -extern int sysctl_compaction_handler (struct ctl_table *table,int write, -void *buffer,size_t *length,loff_t *ppos); -extern int compaction_proactiveness_sysctl_handler (struct ctl_table *table, -int write,void *buffer,size_t *length,loff_t *ppos); -extern int sysctl_extfrag_threshold; -extern int sysctl_compact_unevictable_allowed;extern unsigned int extfrag_for_order (struct zone *zone,unsigned int order);extern int fragmentation_index (struct zone *zone,unsigned int order);
kernel/sysctl.c +0 -59
77 lines not on this page · raw message
mm/compaction.c +72 -12
120 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 15 lines · On 3/28/23 08:46, [email protected] wrote:
From: Minghao Chi <[email protected]>
This moves all compaction sysctls to its own file.
Move sysctl to where the functionality truly belongs to improve readability, reduce merge conflicts, and facilitate maintenance.
I use
x86_defconfigand linux-next-20230327 branch$ make defconfig;make all -jn CONFIG_COMPACTION=yadd/remove: 1/0 grow/shrink: 1/1 up/down: 350/-256 (94)
Function old new delta vm_compaction - 320 +320 kcompactd_init 180 210 +30
Quoted 8 lines
vm_table2112 1856 -256
Total: Before=21119987, After=21120081, chg +0.00%Despite the addition of 94 bytes the patch still seems a worthwile cleanup.
Thanks.
Quoted 19 lines · Vlastimil Babka
Quoted 18 lines · On 3/28/23 08:46, [email protected] wrote:
From: Minghao Chi <[email protected]>
This moves all compaction sysctls to its own file.
Move sysctl to where the functionality truly belongs to improve readability, reduce merge conflicts, and facilitate maintenance.
I use
x86_defconfigand linux-next-20230327 branch$ make defconfig;make all -jn CONFIG_COMPACTION=yadd/remove: 1/0 grow/shrink: 1/1 up/down: 350/-256 (94)
Function old new delta vm_compaction - 320 +320 kcompactd_init 180 210 +30
vm_table2112 1856 -256
Total: Before=21119987, After=21120081, chg +0.00%
Quoted 7 lines
Quoted 5 lines
Despite the addition of 94 bytes the patch still seems a worthwile cleanup.
Acked-by Vlastimil Babka <[email protected]>
Thanks, queued up on sysctl-next.
Luis