mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
f2fs: try grabbing node page lock aggressively in sync scenario
In synchronous scenario, like in checkpoint(), we are going to flush dirty node pages to device synchronously, we can easily failed writebacking node page due to trylock_page() failure, especially in condition of intensive lock competition, which can cause long latency of checkpoint(). So let's use lock_page() in synchronous scenario to avoid this issue. Signed-off-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
dc1328027b
commit
4b270a8cc5
1 changed files with 3 additions and 1 deletions
|
@ -1638,7 +1638,9 @@ next_step:
|
|||
!is_cold_node(page)))
|
||||
continue;
|
||||
lock_node:
|
||||
if (!trylock_page(page))
|
||||
if (wbc->sync_mode == WB_SYNC_ALL)
|
||||
lock_page(page);
|
||||
else if (!trylock_page(page))
|
||||
continue;
|
||||
|
||||
if (unlikely(page->mapping != NODE_MAPPING(sbi))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue