diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-04-06 08:48:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-06 11:04:53 -0400 |
commit | 1faa16d22877f4839bd433547d770c676d1d964c (patch) | |
tree | 9a0d50be1ef0358c1f53d7107413100904e7d526 /include/linux/backing-dev.h | |
parent | 0221c81b1b8eb0cbb6b30a0ced52ead32d2b4e4c (diff) |
block: change the request allocation/congestion logic to be sync/async based
This makes sure that we never wait on async IO for sync requests, instead
of doing the split on writes vs reads.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/backing-dev.h')
-rw-r--r-- | include/linux/backing-dev.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index bee52abb8a4d..0ec2c594868e 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -24,8 +24,8 @@ struct dentry; | |||
24 | */ | 24 | */ |
25 | enum bdi_state { | 25 | enum bdi_state { |
26 | BDI_pdflush, /* A pdflush thread is working this device */ | 26 | BDI_pdflush, /* A pdflush thread is working this device */ |
27 | BDI_write_congested, /* The write queue is getting full */ | 27 | BDI_async_congested, /* The async (write) queue is getting full */ |
28 | BDI_read_congested, /* The read queue is getting full */ | 28 | BDI_sync_congested, /* The sync queue is getting full */ |
29 | BDI_unused, /* Available bits start here */ | 29 | BDI_unused, /* Available bits start here */ |
30 | }; | 30 | }; |
31 | 31 | ||
@@ -215,18 +215,18 @@ static inline int bdi_congested(struct backing_dev_info *bdi, int bdi_bits) | |||
215 | 215 | ||
216 | static inline int bdi_read_congested(struct backing_dev_info *bdi) | 216 | static inline int bdi_read_congested(struct backing_dev_info *bdi) |
217 | { | 217 | { |
218 | return bdi_congested(bdi, 1 << BDI_read_congested); | 218 | return bdi_congested(bdi, 1 << BDI_sync_congested); |
219 | } | 219 | } |
220 | 220 | ||
221 | static inline int bdi_write_congested(struct backing_dev_info *bdi) | 221 | static inline int bdi_write_congested(struct backing_dev_info *bdi) |
222 | { | 222 | { |
223 | return bdi_congested(bdi, 1 << BDI_write_congested); | 223 | return bdi_congested(bdi, 1 << BDI_async_congested); |
224 | } | 224 | } |
225 | 225 | ||
226 | static inline int bdi_rw_congested(struct backing_dev_info *bdi) | 226 | static inline int bdi_rw_congested(struct backing_dev_info *bdi) |
227 | { | 227 | { |
228 | return bdi_congested(bdi, (1 << BDI_read_congested)| | 228 | return bdi_congested(bdi, (1 << BDI_sync_congested) | |
229 | (1 << BDI_write_congested)); | 229 | (1 << BDI_async_congested)); |
230 | } | 230 | } |
231 | 231 | ||
232 | void clear_bdi_congested(struct backing_dev_info *bdi, int rw); | 232 | void clear_bdi_congested(struct backing_dev_info *bdi, int rw); |