pager_daemon removal
Subsystems (15)
PATCH 1/1 pager_daemon removal
Hi Marcelo,
In 2.4.14, the only reference to pager_daemon structure (in mm/page_io.c) was removed. That struct was used to store the values for swap cluster, which was the maximum number of asynchronous swapout pages in rw_swap_page_base().
In this cleanup patch (against 2.4.18-pre2), I removed the pager_daemon struct (along with the include/linux/swapctl.h file) and also the kswapd entry in /proc/sys/vm, which was used to change the values in this structure. All references to this swpctl.h file and a bogus comment in page_io.c were removed as well.
Comments?
Regards,
Rodrigo
arch/arm/mm/init.c +0 -1
@@ -18,7 +18,6 @@#include <linux/mman.h> #include <linux/mm.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/smp.h> #include <linux/init.h> #include <linux/bootmem.h>
arch/mips/mm/init.c +0 -1
@@ -24,7 +24,6 @@#include <linux/bootmem.h> #include <linux/highmem.h> #include <linux/swap.h> -#include <linux/swapctl.h> #ifdef CONFIG_BLK_DEV_INITRD #include <linux/blk.h> #endif
arch/mips64/mm/init.c +0 -1
@@ -21,7 +21,6 @@#include <linux/bootmem.h> #include <linux/highmem.h> #include <linux/swap.h> -#include <linux/swapctl.h> #ifdef CONFIG_BLK_DEV_INITRD #include <linux/blk.h> #endif
arch/sparc/mm/init.c +0 -1
@@ -18,7 +18,6 @@#include <linux/mman.h> #include <linux/mm.h> #include <linux/swap.h> -#include <linux/swapctl.h> #ifdef CONFIG_BLK_DEV_INITRD #include <linux/blk.h> #endif
arch/sparc64/mm/init.c +0 -1
@@ -15,7 +15,6 @@#include <linux/slab.h> #include <linux/blk.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/pagemap.h> #include <linux/fs.h> #include <linux/seq_file.h>
fs/buffer.c +0 -1
@@ -35,7 +35,6 @@#include <linux/locks.h> #include <linux/errno.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/smp_lock.h> #include <linux/vmalloc.h> #include <linux/blkdev.h>
fs/coda/sysctl.c +0 -1
@@ -15,7 +15,6 @@#include <linux/sched.h> #include <linux/mm.h> #include <linux/sysctl.h> -#include <linux/swapctl.h> #include <linux/proc_fs.h> #include <linux/slab.h> #include <linux/stat.h>
fs/inode.c +0 -1
@@ -14,7 +14,6 @@#include <linux/slab.h> #include <linux/cache.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/prefetch.h> #include <linux/locks.h>
fs/intermezzo/sysctl.c +0 -1
@@ -8,7 +8,6 @@#include <linux/sched.h> #include <linux/mm.h> #include <linux/sysctl.h> -#include <linux/swapctl.h> #include <linux/proc_fs.h> #include <linux/slab.h> #include <linux/vmalloc.h>
include/linux/swapctl.h +0 -13
@@ -1,13 +0,0 @@ -#ifndef _LINUX_SWAPCTL_H -#define _LINUX_SWAPCTL_H - -typedef struct pager_daemon_v1 -{ -unsigned int tries_base; -unsigned int tries_min; -unsigned int swap_cluster; -}pager_daemon_v1 ; -typedef pager_daemon_v1 pager_daemon_t ; -extern pager_daemon_t pager_daemon; - -#endif /* _LINUX_SWAPCTL_H */
include/linux/sysctl.h +4 -5
@@ -137,11 +137,10 @@VM_OVERCOMMIT_MEMORY =5 ,/* Turn off the virtual memory safety limit */ VM_BUFFERMEM =6 ,/* struct: Set buffer memory thresholds */ VM_PAGECACHE =7 ,/* struct: Set cache memory thresholds */ -VM_PAGERDAEMON =8 ,/* struct: Control kswapd behaviour */ -VM_PGT_CACHE =9 ,/* struct: Set page table cache parameters */ -VM_PAGE_CLUSTER =10 ,/* int: set number of pages to swap together */ -VM_MIN_READAHEAD =12 ,/* Min file readahead */ - VM_MAX_READAHEAD=13 /* Max file readahead */ +VM_PGT_CACHE =8 ,/* struct: Set page table cache parameters */ +VM_PAGE_CLUSTER =9 ,/* int: set number of pages to swap together */ +VM_MIN_READAHEAD =10 ,/* Min file readahead */ + VM_MAX_READAHEAD=11 /* Max file readahead */ };
kernel/sysctl.c +0 -3
@@ -21,7 +21,6 @@#include <linux/config.h> #include <linux/slab.h> #include <linux/sysctl.h> -#include <linux/swapctl.h> #include <linux/proc_fs.h> #include <linux/ctype.h> #include <linux/utsname.h>
@@ -265,8 +264,6 @@ &bdflush_min, &bdflush_max}, {VM_OVERCOMMIT_MEMORY ,"overcommit_memory" , &sysctl_overcommit_memory, sizeof(sysctl_overcommit_memory), 0644, NULL, &proc_dointvec}, - {VM_PAGERDAEMON, "kswapd", - &pager_daemon, sizeof(pager_daemon_t), 0644, NULL, &proc_dointvec}, {VM_PGT_CACHE, "pagetable_cache", &pgt_cache_water, 2*sizeof(int), 0644, NULL, &proc_dointvec}, {VM_PAGE_CLUSTER, "page-cluster",
mm/bootmem.c +0 -1
@@ -12,7 +12,6 @@#include <linux/mm.h> #include <linux/kernel_stat.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/interrupt.h> #include <linux/init.h> #include <linux/bootmem.h>
mm/filemap.c +0 -1
@@ -19,7 +19,6 @@#include <linux/smp_lock.h> #include <linux/blkdev.h> #include <linux/file.h> -#include <linux/swapctl.h> #include <linux/init.h> #include <linux/mm.h> #include <linux/iobuf.h>
mm/memory.c +0 -1
@@ -40,7 +40,6 @@#include <linux/mman.h> #include <linux/swap.h> #include <linux/smp_lock.h> -#include <linux/swapctl.h> #include <linux/iobuf.h> #include <linux/highmem.h> #include <linux/pagemap.h>
mm/mmap.c +0 -1
@@ -8,7 +8,6 @@#include <linux/mman.h> #include <linux/pagemap.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/smp_lock.h> #include <linux/init.h> #include <linux/file.h>
mm/oom_kill.c +0 -1
@@ -18,7 +18,6 @@#include <linux/mm.h> #include <linux/sched.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/timex.h> /* #define DEBUG */
mm/page_alloc.c +0 -1
@@ -12,7 +12,6 @@#include <linux/config.h> #include <linux/mm.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/interrupt.h> #include <linux/pagemap.h> #include <linux/bootmem.h>
mm/page_io.c +0 -2
@@ -14,13 +14,11 @@#include <linux/kernel_stat.h> #include <linux/swap.h> #include <linux/locks.h> -#include <linux/swapctl.h> #include <asm/pgtable.h> /* * Reads or writes a swap page. -* wait=1: start I/O and wait for completion. wait=0: start asynchronous I/O. * * Important prevention of race condition: the caller *must* atomically * create a unique swap cache entry for this swap page before calling
mm/swap.c +0 -7
@@ -16,7 +16,6 @@#include <linux/mm.h> #include <linux/kernel_stat.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/pagemap.h> #include <linux/init.h>
@@ -26,12 +25,6 @@/* How many pages do we try to swap or page in/out together? */ int page_cluster; - -pager_daemon_t pager_daemon = { -512 ,/* base number for calculating the number of tries */ -SWAP_CLUSTER_MAX ,/* minimum number of tries */ -8 ,/* do swap I/O in clusters of this size */ -};/* * Move an inactive page to the active list.
mm/swap_state.c +0 -1
@@ -10,7 +10,6 @@#include <linux/mm.h> #include <linux/kernel_stat.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/init.h> #include <linux/pagemap.h> #include <linux/smp_lock.h>
mm/swapfile.c +0 -1
@@ -9,7 +9,6 @@#include <linux/smp_lock.h> #include <linux/kernel_stat.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/blkdev.h> /* for blk_size */ #include <linux/vmalloc.h> #include <linux/pagemap.h>
mm/vmscan.c +0 -1
@@ -14,7 +14,6 @@#include <linux/slab.h> #include <linux/kernel_stat.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/smp_lock.h> #include <linux/pagemap.h> #include <linux/init.h>
Quoted 1 line · Rodrigo Souza de Castro
Comments?
You're not allowed to renumber sysctl defines, it's ok to remove the VM_PAGER_DAEMON thing, but the following defines should stay the same number ...
regards,
Rik
Signature · 4 lines
"Linux holds advantages over the single-vendor commercial OS"
-- Microsoft's "Competing with Linux" document
http://www.surriel.com/ http://distro.conectiva.com/Quoted 7 lines · Rik van Riel
Quoted 1 line · Rodrigo Souza de Castro
Comments?
You're not allowed to renumber sysctl defines, it's ok to remove the
VM_PAGER_DAEMONthing, but the following defines should stay the same number ...
Oops, you are right, thanks. New patch follows.
Regards,
Rodrigo
arch/arm/mm/init.c +0 -1
@@ -18,7 +18,6 @@#include <linux/mman.h> #include <linux/mm.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/smp.h> #include <linux/init.h> #include <linux/bootmem.h>
arch/mips/mm/init.c +0 -1
@@ -24,7 +24,6 @@#include <linux/bootmem.h> #include <linux/highmem.h> #include <linux/swap.h> -#include <linux/swapctl.h> #ifdef CONFIG_BLK_DEV_INITRD #include <linux/blk.h> #endif
arch/mips64/mm/init.c +0 -1
@@ -21,7 +21,6 @@#include <linux/bootmem.h> #include <linux/highmem.h> #include <linux/swap.h> -#include <linux/swapctl.h> #ifdef CONFIG_BLK_DEV_INITRD #include <linux/blk.h> #endif
arch/sparc/mm/init.c +0 -1
@@ -18,7 +18,6 @@#include <linux/mman.h> #include <linux/mm.h> #include <linux/swap.h> -#include <linux/swapctl.h> #ifdef CONFIG_BLK_DEV_INITRD #include <linux/blk.h> #endif
arch/sparc64/mm/init.c +0 -1
@@ -15,7 +15,6 @@#include <linux/slab.h> #include <linux/blk.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/pagemap.h> #include <linux/fs.h> #include <linux/seq_file.h>
fs/buffer.c +0 -1
@@ -35,7 +35,6 @@#include <linux/locks.h> #include <linux/errno.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/smp_lock.h> #include <linux/vmalloc.h> #include <linux/blkdev.h>
fs/coda/sysctl.c +0 -1
@@ -15,7 +15,6 @@#include <linux/sched.h> #include <linux/mm.h> #include <linux/sysctl.h> -#include <linux/swapctl.h> #include <linux/proc_fs.h> #include <linux/slab.h> #include <linux/stat.h>
fs/inode.c +0 -1
@@ -14,7 +14,6 @@#include <linux/slab.h> #include <linux/cache.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/prefetch.h> #include <linux/locks.h>
fs/intermezzo/sysctl.c +0 -1
@@ -8,7 +8,6 @@#include <linux/sched.h> #include <linux/mm.h> #include <linux/sysctl.h> -#include <linux/swapctl.h> #include <linux/proc_fs.h> #include <linux/slab.h> #include <linux/vmalloc.h>
include/linux/swapctl.h +0 -13
@@ -1,13 +0,0 @@ -#ifndef _LINUX_SWAPCTL_H -#define _LINUX_SWAPCTL_H - -typedef struct pager_daemon_v1 -{ -unsigned int tries_base; -unsigned int tries_min; -unsigned int swap_cluster; -}pager_daemon_v1 ; -typedef pager_daemon_v1 pager_daemon_t ; -extern pager_daemon_t pager_daemon; - -#endif /* _LINUX_SWAPCTL_H */
include/linux/sysctl.h +0 -1
@@ -137,7 +137,6 @@VM_OVERCOMMIT_MEMORY =5 ,/* Turn off the virtual memory safety limit */ VM_BUFFERMEM =6 ,/* struct: Set buffer memory thresholds */ VM_PAGECACHE =7 ,/* struct: Set cache memory thresholds */ -VM_PAGERDAEMON =8 ,/* struct: Control kswapd behaviour */ VM_PGT_CACHE =9 ,/* struct: Set page table cache parameters */ VM_PAGE_CLUSTER =10 ,/* int: set number of pages to swap together */ VM_MIN_READAHEAD=12, /* Min file readahead */
kernel/sysctl.c +0 -3
@@ -21,7 +21,6 @@#include <linux/config.h> #include <linux/slab.h> #include <linux/sysctl.h> -#include <linux/swapctl.h> #include <linux/proc_fs.h> #include <linux/ctype.h> #include <linux/utsname.h>
@@ -265,8 +264,6 @@ &bdflush_min, &bdflush_max}, {VM_OVERCOMMIT_MEMORY ,"overcommit_memory" , &sysctl_overcommit_memory, sizeof(sysctl_overcommit_memory), 0644, NULL, &proc_dointvec}, - {VM_PAGERDAEMON, "kswapd", - &pager_daemon, sizeof(pager_daemon_t), 0644, NULL, &proc_dointvec}, {VM_PGT_CACHE, "pagetable_cache", &pgt_cache_water, 2*sizeof(int), 0644, NULL, &proc_dointvec}, {VM_PAGE_CLUSTER, "page-cluster",
mm/bootmem.c +0 -1
@@ -12,7 +12,6 @@#include <linux/mm.h> #include <linux/kernel_stat.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/interrupt.h> #include <linux/init.h> #include <linux/bootmem.h>
mm/filemap.c +0 -1
@@ -19,7 +19,6 @@#include <linux/smp_lock.h> #include <linux/blkdev.h> #include <linux/file.h> -#include <linux/swapctl.h> #include <linux/init.h> #include <linux/mm.h> #include <linux/iobuf.h>
mm/memory.c +0 -1
@@ -40,7 +40,6 @@#include <linux/mman.h> #include <linux/swap.h> #include <linux/smp_lock.h> -#include <linux/swapctl.h> #include <linux/iobuf.h> #include <linux/highmem.h> #include <linux/pagemap.h>
mm/mmap.c +0 -1
@@ -8,7 +8,6 @@#include <linux/mman.h> #include <linux/pagemap.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/smp_lock.h> #include <linux/init.h> #include <linux/file.h>
mm/oom_kill.c +0 -1
@@ -18,7 +18,6 @@#include <linux/mm.h> #include <linux/sched.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/timex.h> /* #define DEBUG */
mm/page_alloc.c +0 -1
@@ -12,7 +12,6 @@#include <linux/config.h> #include <linux/mm.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/interrupt.h> #include <linux/pagemap.h> #include <linux/bootmem.h>
mm/page_io.c +0 -2
@@ -14,13 +14,11 @@#include <linux/kernel_stat.h> #include <linux/swap.h> #include <linux/locks.h> -#include <linux/swapctl.h> #include <asm/pgtable.h> /* * Reads or writes a swap page. -* wait=1: start I/O and wait for completion. wait=0: start asynchronous I/O. * * Important prevention of race condition: the caller *must* atomically * create a unique swap cache entry for this swap page before calling
mm/swap.c +0 -7
@@ -16,7 +16,6 @@#include <linux/mm.h> #include <linux/kernel_stat.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/pagemap.h> #include <linux/init.h>
@@ -26,12 +25,6 @@/* How many pages do we try to swap or page in/out together? */ int page_cluster; - -pager_daemon_t pager_daemon = { -512 ,/* base number for calculating the number of tries */ -SWAP_CLUSTER_MAX ,/* minimum number of tries */ -8 ,/* do swap I/O in clusters of this size */ -};/* * Move an inactive page to the active list.
mm/swap_state.c +0 -1
@@ -10,7 +10,6 @@#include <linux/mm.h> #include <linux/kernel_stat.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/init.h> #include <linux/pagemap.h> #include <linux/smp_lock.h>
mm/swapfile.c +0 -1
@@ -9,7 +9,6 @@#include <linux/smp_lock.h> #include <linux/kernel_stat.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/blkdev.h> /* for blk_size */ #include <linux/vmalloc.h> #include <linux/pagemap.h>
mm/vmscan.c +0 -1
@@ -14,7 +14,6 @@#include <linux/slab.h> #include <linux/kernel_stat.h> #include <linux/swap.h> -#include <linux/swapctl.h> #include <linux/smp_lock.h> #include <linux/pagemap.h> #include <linux/init.h>
Quoted 10 lines · Rodrigo Souza de Castro
Quoted 7 lines · Rik van Riel
Quoted 1 line · Rodrigo Souza de Castro
Comments?
You're not allowed to renumber sysctl defines, it's ok to remove the
VM_PAGER_DAEMONthing, but the following defines should stay the same number ...Oops, you are right, thanks. New patch follows.
Looks good to me ...
Rik
Signature · 4 lines
"Linux holds advantages over the single-vendor commercial OS"
-- Microsoft's "Competing with Linux" document
http://www.surriel.com/ http://distro.conectiva.com/