From: Frederic Weisbecker <frederic@kernel.org>
To: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Cc: paulmck@kernel.org, joel@joelfernandes.org, urezki@gmail.com,
josh@joshtriplett.org, boqun.feng@gmail.com, rostedt@goodmis.org,
mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com,
qiang.zhang1211@gmail.com, rcu@vger.kernel.org,
linux-kernel@vger.kernel.org, neeraj.upadhyay@kernel.org
Subject: Re: [PATCH v2] rcu: Reduce synchronize_rcu() delays when all wait heads are in use
Date: Thu, 4 Apr 2024 23:42:38 +0200 [thread overview]
Message-ID: <Zg8ezv2vzylVwg2q@pavilion.home> (raw)
In-Reply-To: <20240403105212.237354-1-Neeraj.Upadhyay@amd.com>
Le Wed, Apr 03, 2024 at 04:22:12PM +0530, Neeraj Upadhyay a écrit :
> When all wait heads are in use, which can happen when
> rcu_sr_normal_gp_cleanup_work()'s callback processing
> is slow, any new synchronize_rcu() user's rcu_synchronize
> node's processing is deferred to future GP periods. This
> can result in long list of synchronize_rcu() invocations
> waiting for full grace period processing, which can delay
> freeing of memory. Mitigate this problem by using first
> node in the list as wait tail when all wait heads are in use.
> While methods to speed up callback processing would be needed
> to recover from this situation, allowing new nodes to complete
> their grace period can help prevent delays due to a fixed
> number of wait head nodes.
>
> Signed-off-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Looking at it again, I'm not sure if it's a good idea to
optimize the thing that far. It's already a tricky state machine
to review and the workqueue has SR_NORMAL_GP_WAIT_HEAD_MAX - 1 = 4
grace periods worth of time to execute. Such a tense situation may
happen of course but, should we really work around that?
I let you guys judge. In the meantime, I haven't found correctness
issues:
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Thanks.
next prev parent reply other threads:[~2024-04-04 21:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 10:52 [PATCH v2] rcu: Reduce synchronize_rcu() delays when all wait heads are in use Neeraj Upadhyay
2024-04-04 17:46 ` Paul E. McKenney
2024-04-04 21:42 ` Frederic Weisbecker [this message]
2024-04-05 2:15 ` Neeraj Upadhyay
2024-04-09 8:49 ` Uladzislau Rezki
2024-04-09 17:14 ` Paul E. McKenney
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=Zg8ezv2vzylVwg2q@pavilion.home \
--to=frederic@kernel.org \
--cc=Neeraj.Upadhyay@amd.com \
--cc=boqun.feng@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=neeraj.upadhyay@kernel.org \
--cc=paulmck@kernel.org \
--cc=qiang.zhang1211@gmail.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.