mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 06:50:08 +00:00
Btrfs: run the backing dev more often in the submit_bio helper
The submit_bio helper thread can decide to loop back around to service more bios. This commit forces it to unplug first, which helps reduce the latency seen by submitters. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
4849f01d15
commit
51684082b1
@ -325,16 +325,6 @@ loop_lock:
|
||||
num_sync_run = 0;
|
||||
blk_run_backing_dev(bdi, NULL);
|
||||
}
|
||||
|
||||
cond_resched();
|
||||
if (again)
|
||||
goto loop;
|
||||
|
||||
spin_lock(&device->io_lock);
|
||||
if (device->pending_bios.head || device->pending_sync_bios.head)
|
||||
goto loop_lock;
|
||||
spin_unlock(&device->io_lock);
|
||||
|
||||
/*
|
||||
* IO has already been through a long path to get here. Checksumming,
|
||||
* async helper threads, perhaps compression. We've done a pretty
|
||||
@ -346,6 +336,16 @@ loop_lock:
|
||||
* cared about found its way down here.
|
||||
*/
|
||||
blk_run_backing_dev(bdi, NULL);
|
||||
|
||||
cond_resched();
|
||||
if (again)
|
||||
goto loop;
|
||||
|
||||
spin_lock(&device->io_lock);
|
||||
if (device->pending_bios.head || device->pending_sync_bios.head)
|
||||
goto loop_lock;
|
||||
spin_unlock(&device->io_lock);
|
||||
|
||||
done:
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user