diff options
| author | Andrew Morton <akpm@zip.com.au> | 2002-05-19 02:22:12 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 2002-05-19 02:22:12 -0700 |
| commit | 17a74e8800eb0f00a74b9c1d269483e4f9f22bc8 (patch) | |
| tree | 23d64638546b1f72a0143ca67509d05f3c731755 /include/linux | |
| parent | 1f6acea0de867d7f5e5a43ba43cf3be744da412c (diff) | |
[PATCH] pdflush exclusion
Use the pdflush exclusion infrastructure to ensure that only one
pdlfush thread is ever performing writeback against a particular
request_queue.
This works rather well. It requires a lot of activity against a lot of
disks to cause more pdflush threads to start up. Possibly the
thread-creation logic is a little weak: it starts more threads when a
pdflush thread goes back to sleep. It may be better to start new
threads within pdlfush_operation().
All non-request_queue-backed address_spaces share the global
default_backing_dev_info structure. So at present only a single
pdflush instance will be available for background writeback of *all*
NFS filesystems (for example).
If there is benefit in concurrent background writeback for multiple NFS
mounts then NFS would need to create per-mount backing_dev_info
structures and install those into new inode's address_spaces in some
manner.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/writeback.h | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 374045884cb8..b936413f96f2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -112,7 +112,6 @@ extern int leases_enable, dir_notify_enable, lease_break_time; #define MS_MOVE 8192 #define MS_REC 16384 #define MS_VERBOSE 32768 -#define MS_FLUSHING (1<<16) /* inodes are currently under writeout */ #define MS_ACTIVE (1<<30) #define MS_NOUSER (1<<31) @@ -156,7 +155,6 @@ extern int leases_enable, dir_notify_enable, lease_break_time; #define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY) #define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || ((inode)->i_flags & S_SYNC)) #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) -#define IS_FLUSHING(inode) __IS_FLG(inode, MS_FLUSHING) #define IS_QUOTAINIT(inode) ((inode)->i_flags & S_QUOTA) #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 1978e06d1131..a089dd009fc1 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -13,6 +13,15 @@ extern struct list_head inode_in_use; extern struct list_head inode_unused; /* + * Yes, writeback.h requires sched.h + * No, sched.h is not included from here. + */ +static inline int current_is_pdflush(void) +{ + return current->flags & PF_FLUSHER; +} + +/* * fs/fs-writeback.c */ #define WB_SYNC_NONE 0 /* Don't wait on anything */ |
