diff options
| author | Jens Axboe <[email protected]> | 2009-04-06 12:48:01 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-04-06 15:04:53 +0000 |
| commit | 1faa16d22877f4839bd433547d770c676d1d964c (patch) | |
| tree | 9a0d50be1ef0358c1f53d7107413100904e7d526 /mm/backing-dev.c | |
| parent | Merge branch 'audit.b62' of git://git.kernel.org/pub/scm/linux/kernel/git/vir... (diff) | |
| download | kernel-1faa16d22877f4839bd433547d770c676d1d964c.tar.gz kernel-1faa16d22877f4839bd433547d770c676d1d964c.zip | |
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'mm/backing-dev.c')
| -rw-r--r-- | mm/backing-dev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index be68c956a660..493b468a5035 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -284,12 +284,12 @@ static wait_queue_head_t congestion_wqh[2] = { }; -void clear_bdi_congested(struct backing_dev_info *bdi, int rw) +void clear_bdi_congested(struct backing_dev_info *bdi, int sync) { enum bdi_state bit; - wait_queue_head_t *wqh = &congestion_wqh[rw]; + wait_queue_head_t *wqh = &congestion_wqh[sync]; - bit = (rw == WRITE) ? BDI_write_congested : BDI_read_congested; + bit = sync ? BDI_sync_congested : BDI_async_congested; clear_bit(bit, &bdi->state); smp_mb__after_clear_bit(); if (waitqueue_active(wqh)) @@ -297,11 +297,11 @@ void clear_bdi_congested(struct backing_dev_info *bdi, int rw) } EXPORT_SYMBOL(clear_bdi_congested); -void set_bdi_congested(struct backing_dev_info *bdi, int rw) +void set_bdi_congested(struct backing_dev_info *bdi, int sync) { enum bdi_state bit; - bit = (rw == WRITE) ? BDI_write_congested : BDI_read_congested; + bit = sync ? BDI_sync_congested : BDI_async_congested; set_bit(bit, &bdi->state); } EXPORT_SYMBOL(set_bdi_congested); |
