diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-06 22:02:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-06 22:02:23 -0500 |
commit | 208bca0860406d16398145ddd950036a737c3c9d (patch) | |
tree | 7797a16c17d8bd155120126fa7976727fc6de013 /include/linux/writeback.h | |
parent | 6aad3738f6a79fd0ca480eaceefe064cc471f6eb (diff) | |
parent | 0e175a1835ffc979e55787774e58ec79e41957d7 (diff) |
Merge branch 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux
* 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
writeback: Add a 'reason' to wb_writeback_work
writeback: send work item to queue_io, move_expired_inodes
writeback: trace event balance_dirty_pages
writeback: trace event bdi_dirty_ratelimit
writeback: fix ppc compile warnings on do_div(long long, unsigned long)
writeback: per-bdi background threshold
writeback: dirty position control - bdi reserve area
writeback: control dirty pause time
writeback: limit max dirty pause time
writeback: IO-less balance_dirty_pages()
writeback: per task dirty rate limit
writeback: stabilize bdi->dirty_ratelimit
writeback: dirty rate control
writeback: add bg_threshold parameter to __bdi_update_bandwidth()
writeback: dirty position control
writeback: account per-bdi accumulated dirtied pages
Diffstat (limited to 'include/linux/writeback.h')
-rw-r--r-- | include/linux/writeback.h | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 2b8963ff0f35..a378c295851f 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -39,6 +39,23 @@ enum writeback_sync_modes { | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * why some writeback work was initiated | ||
43 | */ | ||
44 | enum wb_reason { | ||
45 | WB_REASON_BACKGROUND, | ||
46 | WB_REASON_TRY_TO_FREE_PAGES, | ||
47 | WB_REASON_SYNC, | ||
48 | WB_REASON_PERIODIC, | ||
49 | WB_REASON_LAPTOP_TIMER, | ||
50 | WB_REASON_FREE_MORE_MEM, | ||
51 | WB_REASON_FS_FREE_SPACE, | ||
52 | WB_REASON_FORKER_THREAD, | ||
53 | |||
54 | WB_REASON_MAX, | ||
55 | }; | ||
56 | extern const char *wb_reason_name[]; | ||
57 | |||
58 | /* | ||
42 | * A control structure which tells the writeback code what to do. These are | 59 | * A control structure which tells the writeback code what to do. These are |
43 | * always on the stack, and hence need no locking. They are always initialised | 60 | * always on the stack, and hence need no locking. They are always initialised |
44 | * in a manner such that unspecified fields are set to zero. | 61 | * in a manner such that unspecified fields are set to zero. |
@@ -69,14 +86,17 @@ struct writeback_control { | |||
69 | */ | 86 | */ |
70 | struct bdi_writeback; | 87 | struct bdi_writeback; |
71 | int inode_wait(void *); | 88 | int inode_wait(void *); |
72 | void writeback_inodes_sb(struct super_block *); | 89 | void writeback_inodes_sb(struct super_block *, enum wb_reason reason); |
73 | void writeback_inodes_sb_nr(struct super_block *, unsigned long nr); | 90 | void writeback_inodes_sb_nr(struct super_block *, unsigned long nr, |
74 | int writeback_inodes_sb_if_idle(struct super_block *); | 91 | enum wb_reason reason); |
75 | int writeback_inodes_sb_nr_if_idle(struct super_block *, unsigned long nr); | 92 | int writeback_inodes_sb_if_idle(struct super_block *, enum wb_reason reason); |
93 | int writeback_inodes_sb_nr_if_idle(struct super_block *, unsigned long nr, | ||
94 | enum wb_reason reason); | ||
76 | void sync_inodes_sb(struct super_block *); | 95 | void sync_inodes_sb(struct super_block *); |
77 | long writeback_inodes_wb(struct bdi_writeback *wb, long nr_pages); | 96 | long writeback_inodes_wb(struct bdi_writeback *wb, long nr_pages, |
97 | enum wb_reason reason); | ||
78 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); | 98 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); |
79 | void wakeup_flusher_threads(long nr_pages); | 99 | void wakeup_flusher_threads(long nr_pages, enum wb_reason reason); |
80 | 100 | ||
81 | /* writeback.h requires fs.h; it, too, is not included from here. */ | 101 | /* writeback.h requires fs.h; it, too, is not included from here. */ |
82 | static inline void wait_on_inode(struct inode *inode) | 102 | static inline void wait_on_inode(struct inode *inode) |
@@ -143,6 +163,7 @@ unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, | |||
143 | 163 | ||
144 | void __bdi_update_bandwidth(struct backing_dev_info *bdi, | 164 | void __bdi_update_bandwidth(struct backing_dev_info *bdi, |
145 | unsigned long thresh, | 165 | unsigned long thresh, |
166 | unsigned long bg_thresh, | ||
146 | unsigned long dirty, | 167 | unsigned long dirty, |
147 | unsigned long bdi_thresh, | 168 | unsigned long bdi_thresh, |
148 | unsigned long bdi_dirty, | 169 | unsigned long bdi_dirty, |