mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Fix congestion_wait() sync/async vs read/write confusion
Commit 1faa16d228 accidentally broke
the bdi congestion wait queue logic, causing us to wait on congestion
for WRITE (== 1) when we really wanted BLK_RW_ASYNC (== 0) instead.
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
c2cc49a2f8
commit
8aa7e847d8
16 changed files with 43 additions and 40 deletions
|
|
@ -575,7 +575,7 @@ static void balance_dirty_pages(struct address_space *mapping)
|
|||
if (pages_written >= write_chunk)
|
||||
break; /* We've done our duty */
|
||||
|
||||
congestion_wait(WRITE, HZ/10);
|
||||
congestion_wait(BLK_RW_ASYNC, HZ/10);
|
||||
}
|
||||
|
||||
if (bdi_nr_reclaimable + bdi_nr_writeback < bdi_thresh &&
|
||||
|
|
@ -669,7 +669,7 @@ void throttle_vm_writeout(gfp_t gfp_mask)
|
|||
if (global_page_state(NR_UNSTABLE_NFS) +
|
||||
global_page_state(NR_WRITEBACK) <= dirty_thresh)
|
||||
break;
|
||||
congestion_wait(WRITE, HZ/10);
|
||||
congestion_wait(BLK_RW_ASYNC, HZ/10);
|
||||
|
||||
/*
|
||||
* The caller might hold locks which can prevent IO completion
|
||||
|
|
@ -715,7 +715,7 @@ static void background_writeout(unsigned long _min_pages)
|
|||
if (wbc.nr_to_write > 0 || wbc.pages_skipped > 0) {
|
||||
/* Wrote less than expected */
|
||||
if (wbc.encountered_congestion || wbc.more_io)
|
||||
congestion_wait(WRITE, HZ/10);
|
||||
congestion_wait(BLK_RW_ASYNC, HZ/10);
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
|
@ -787,7 +787,7 @@ static void wb_kupdate(unsigned long arg)
|
|||
writeback_inodes(&wbc);
|
||||
if (wbc.nr_to_write > 0) {
|
||||
if (wbc.encountered_congestion || wbc.more_io)
|
||||
congestion_wait(WRITE, HZ/10);
|
||||
congestion_wait(BLK_RW_ASYNC, HZ/10);
|
||||
else
|
||||
break; /* All the old data is written */
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue