The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] rcu/kvfree: Delay the execution of drain_page_cache()
@ 2023-04-05  2:13 Zqiang
  2023-04-05 14:41 ` Uladzislau Rezki
  0 siblings, 1 reply; 2+ messages in thread
From: Zqiang @ 2023-04-05  2:13 UTC (permalink / raw)
  To: urezki, paulmck, frederic, joel, qiang1.zhang
  Cc: qiang.zhang1211, rcu, linux-kernel

Currently, in kfree_rcu_shrink_scan(), the drain_page_cache() is
executed before kfree_rcu_monitor() to drain page cache, if the
bnode structure's->gp_snap has done, the kvfree_rcu_bulk() will
fill the page cache again in kfree_rcu_monitor(), this commit
therefore move drain_page_cache() after kfree_rcu_monitor() to
drain page cache.

Signed-off-by: Zqiang <qiang1.zhang@intel.com>
---
 kernel/rcu/tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 35be35f8236b..3461fc2640b9 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3424,8 +3424,8 @@ kfree_rcu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
 		struct kfree_rcu_cpu *krcp = per_cpu_ptr(&krc, cpu);
 
 		count = krc_count(krcp);
-		count += drain_page_cache(krcp);
 		kfree_rcu_monitor(&krcp->monitor_work.work);
+		count += drain_page_cache(krcp);
 
 		sc->nr_to_scan -= count;
 		freed += count;
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-05 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-05  2:13 [PATCH] rcu/kvfree: Delay the execution of drain_page_cache() Zqiang
2023-04-05 14:41 ` Uladzislau Rezki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox