From: Peter Zijlstra <peterz@infradead.org>
To: Z qiang <qiang.zhang1211@gmail.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
Waiman Long <longman@redhat.com>, Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Valentin Schneider <vschneid@redhat.com>,
linux-kernel@vger.kernel.org, Phil Auld <pauld@redhat.com>,
kernel test robot <oliver.sang@intel.com>,
aubrey.li@linux.intel.com, yu.c.chen@intel.com,
frederic@kernel.org, quic_neeraju@quicinc.com,
joel@joelfernandes.org, josh@joshtriplett.org,
boqun.feng@gmail.com, mathieu.desnoyers@efficios.com,
jiangshanlai@gmail.com
Subject: Re: [PATCH] rcu: Break rcu_node_0 --> &rq->__lock order
Date: Wed, 1 Nov 2023 15:38:14 +0100 [thread overview]
Message-ID: <20231101143814.GL15024@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <CALm+0cWuZZLWkwMPS6n1YyTWzkex9=c1E9CB-m6e_F38MNLVqw@mail.gmail.com>
On Wed, Nov 01, 2023 at 07:21:09PM +0800, Z qiang wrote:
> > static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
> > {
> > unsigned long jtsq;
> > + int ret = 0;
> > struct rcu_node *rnp = rdp->mynode;
> >
> > /*
> > @@ -847,8 +852,8 @@ static int rcu_implicit_dynticks_qs(stru
> > (time_after(jiffies, READ_ONCE(rdp->last_fqs_resched) + jtsq * 3) ||
> > rcu_state.cbovld)) {
> > WRITE_ONCE(rdp->rcu_urgent_qs, true);
> > - resched_cpu(rdp->cpu);
> > WRITE_ONCE(rdp->last_fqs_resched, jiffies);
> > + ret = -1;
> > }
> >
>
>
> Maybe some modifications are missing here:
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index aa4c808978b8..77e7a0dc722a 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -867,8 +867,8 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
> if (time_after(jiffies, rcu_state.jiffies_resched)) {
> if (time_after(jiffies,
> READ_ONCE(rdp->last_fqs_resched) + jtsq)) {
> - resched_cpu(rdp->cpu);
> WRITE_ONCE(rdp->last_fqs_resched, jiffies);
> + ret = -1;
> }
> if (IS_ENABLED(CONFIG_IRQ_WORK) &&
> !rdp->rcu_iw_pending && rdp->rcu_iw_gp_seq != rnp->gp_seq &&
>
>
Bah, you're quite right, I missed that there were two sites calling
resched_cpu().
Paul, do you want a fixed up version or will you fold in the fix?
next prev parent reply other threads:[~2023-11-01 14:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 0:14 [PATCH] sched: Don't call any kfree*() API in do_set_cpus_allowed() Waiman Long
2023-10-31 8:53 ` Peter Zijlstra
2023-10-31 10:52 ` Frederic Weisbecker
2023-10-31 12:18 ` Peter Zijlstra
2023-10-31 14:29 ` Paul E. McKenney
2023-10-31 20:02 ` [PATCH] rcu: Break rcu_node_0 --> &rq->__lock order Peter Zijlstra
2023-10-31 21:49 ` Paul E. McKenney
2023-11-01 0:07 ` Waiman Long
2023-11-01 11:21 ` Z qiang
2023-11-01 14:38 ` Peter Zijlstra [this message]
2023-11-01 16:52 ` 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=20231101143814.GL15024@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=aubrey.li@linux.intel.com \
--cc=boqun.feng@gmail.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=oliver.sang@intel.com \
--cc=pauld@redhat.com \
--cc=paulmck@kernel.org \
--cc=qiang.zhang1211@gmail.com \
--cc=quic_neeraju@quicinc.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=yu.c.chen@intel.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.