diff options
| author | Andrew Morton <akpm@zip.com.au> | 2002-07-04 08:30:34 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-07-04 08:30:34 -0700 |
| commit | f0e10c64f3e96dfa55db63407cf0add02fb94bf5 (patch) | |
| tree | 8e360491bab61af58bf976735145c56a9ce9d62c /include | |
| parent | 06be3a5e71ad8d5e55d8efc480c76142f0d982e2 (diff) | |
[PATCH] pdflush cleanup
Writeback/pdflush cleanup patch from Steven Augart
* Exposes nr_pdflush_threads as /proc/sys/vm/nr_pdflush_threads, read-only.
(I like this - I expect that management of the pdflush thread pool
will be important for many-spindle machines, and this is a neat way
of getting at the info).
* Adds minimum and maximum checking to the five writable pdflush
and fs-writeback parameters.
* Minor indentation fix in sysctl.c
* mm/pdflush.c now includes linux/writeback.h, which prototypes
pdflush_operation. This is so that the compiler can
automatically check that the prototype matches the definition.
* Adds a few comments to existing code.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/sysctl.h | 6 | ||||
| -rw-r--r-- | include/linux/writeback.h | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 488bc05dbcc1..da8115ec58f6 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -30,7 +30,10 @@ struct file; -#define CTL_MAXNAME 10 +#define CTL_MAXNAME 10 /* how many path components do we allow in a + call to sysctl? In other words, what is + the largest acceptable value for the nlen + member of a struct __sysctl_args to have? */ struct __sysctl_args { int *name; @@ -145,6 +148,7 @@ enum VM_DIRTY_SYNC=13, /* dirty_sync_ratio */ VM_DIRTY_WB_CS=14, /* dirty_writeback_centisecs */ VM_DIRTY_EXPIRE_CS=15, /* dirty_expire_centisecs */ + VM_NR_PDFLUSH_THREADS=16, /* nr_pdflush_threads */ }; diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 1b2034aa5617..af3ec94cb2ad 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -49,15 +49,22 @@ static inline void wait_on_inode(struct inode *inode) /* * mm/page-writeback.c */ +/* These 5 are exported to sysctl. */ extern int dirty_background_ratio; extern int dirty_async_ratio; extern int dirty_sync_ratio; extern int dirty_writeback_centisecs; extern int dirty_expire_centisecs; + void balance_dirty_pages(struct address_space *mapping); void balance_dirty_pages_ratelimited(struct address_space *mapping); int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0); int do_writepages(struct address_space *mapping, int *nr_to_write); +/* pdflush.c */ +extern int nr_pdflush_threads; /* Global so it can be exported to sysctl + read-only. */ + + #endif /* WRITEBACK_H */ |
