From: Zqiang <qiang1.zhang@intel.com>
To: urezki@gmail.com, paulmck@kernel.org, frederic@kernel.org,
joel@joelfernandes.org, qiang1.zhang@intel.com
Cc: qiang.zhang1211@gmail.com, rcu@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] rcu/kvfree: Delay the execution of drain_page_cache()
Date: Wed, 5 Apr 2023 10:13:42 +0800 [thread overview]
Message-ID: <20230405021342.606264-1-qiang1.zhang@intel.com> (raw)
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
next reply other threads:[~2023-04-05 2:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 2:13 Zqiang [this message]
2023-04-05 14:41 ` [PATCH] rcu/kvfree: Delay the execution of drain_page_cache() Uladzislau Rezki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230405021342.606264-1-qiang1.zhang@intel.com \
--to=qiang1.zhang@intel.com \
--cc=frederic@kernel.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=qiang.zhang1211@gmail.com \
--cc=rcu@vger.kernel.org \
--cc=urezki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox