From: Tejun Heo <tj@kernel.org>
To: NeilBrown <neilb@suse.de>
Cc: cel@kernel.org, Jeff Layton <jlayton@kernel.org>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
linux-nfs@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH v1 2/2] NFSD: Change the filecache laundrette workqueue again
Date: Fri, 3 Jan 2025 12:53:16 -1000 [thread overview]
Message-ID: <Z3hqXM9ENCQFMRK6@slm.duckdns.org> (raw)
In-Reply-To: <173594463285.22054.5607940116597245970@noble.neil.brown.name>
On Sat, Jan 04, 2025 at 09:50:32AM +1100, NeilBrown wrote:
> On Fri, 03 Jan 2025, cel@kernel.org wrote:
...
> I think that instead of passing "list_lru_count()" we should pass some
> constant like 1024.
>
> cnt = list_lru_count()
> while (cnt > 0) {
> num = min(cnt, 1024);
> list_lru_walk(...., num);
> cond_sched()
> cnt -= num;
> }
>
> Then run it from system_wq.
>
> list_lru_shrink is most often called as list_lru_shrink_walk() from a
> shrinker, and the pattern there is essentially that above. A count is
> taken, possibly scaled down, then the shrinker is called in batches.
BTW, there's nothing wrong with taking some msecs or even tens of msecs
running on system_unbound_wq, so the current state may be fine too.
Thanks.
--
tejun
next prev parent reply other threads:[~2025-01-03 22:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-03 1:00 [PATCH v1 1/2] Revert "SUNRPC: Reduce thread wake-up rate when receiving large RPC messages" cel
2025-01-03 1:00 ` [PATCH v1 2/2] NFSD: Change the filecache laundrette workqueue again cel
2025-01-03 14:21 ` Jeff Layton
2025-01-03 22:50 ` NeilBrown
2025-01-03 22:53 ` Tejun Heo [this message]
2025-01-04 15:37 ` Chuck Lever
2025-01-05 22:28 ` NeilBrown
2025-01-06 1:39 ` Chuck Lever
2025-01-06 2:47 ` NeilBrown
2025-01-03 14:11 ` [PATCH v1 1/2] Revert "SUNRPC: Reduce thread wake-up rate when receiving large RPC messages" Jeff Layton
2025-01-04 0:44 ` NeilBrown
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=Z3hqXM9ENCQFMRK6@slm.duckdns.org \
--to=tj@kernel.org \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=okorniev@redhat.com \
--cc=tom@talpey.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