You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07: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 <jens.axboe@oracle.com>
This commit is contained in:
+2
-2
@@ -1666,7 +1666,7 @@ __alloc_pages_high_priority(gfp_t gfp_mask, unsigned int order,
|
||||
preferred_zone, migratetype);
|
||||
|
||||
if (!page && gfp_mask & __GFP_NOFAIL)
|
||||
congestion_wait(WRITE, HZ/50);
|
||||
congestion_wait(BLK_RW_ASYNC, HZ/50);
|
||||
} while (!page && (gfp_mask & __GFP_NOFAIL));
|
||||
|
||||
return page;
|
||||
@@ -1831,7 +1831,7 @@ rebalance:
|
||||
pages_reclaimed += did_some_progress;
|
||||
if (should_alloc_retry(gfp_mask, order, pages_reclaimed)) {
|
||||
/* Wait for some write requests to complete then retry */
|
||||
congestion_wait(WRITE, HZ/50);
|
||||
congestion_wait(BLK_RW_ASYNC, HZ/50);
|
||||
goto rebalance;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user