On 7/15/25 01:17, Mikulas Patocka wrote:
On Thu, 10 Jul 2025, Sheng Yong wrote:
From: Sheng Yong <shengyo...@xiaomi.com>
[..]
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index ec84ba5e93e5..caf6ae9a8b52 100644
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -2742,7 +2742,9 @@ static unsigned long __evict_a_few(unsigned long
nr_buffers)
__make_buffer_clean(b);
__free_buffer_wake(b);
+ dm_bufio_unlock(c);
cond_resched();
+ dm_bufio_lock(c);
}
dm_bufio_unlock(c);
--
2.43.0
Hi
I accepted this patch. I changed it to:
- cond_resched();
+ if (need_resched()) {
+ dm_bufio_unlock(c);
+ cond_resched();
+ dm_bufio_lock(c);
+ }
}
dm_bufio_unlock(c);
so that we are not hammering on the dm bufio lock when scheduling is not
needed.
Hi, Mikulas,
Thank you for the update. It looks good to me.
thanks,
Yong
Mikulas