From: "Paul E. McKenney" <paulmck@kernel.org>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@fb.com, mingo@kernel.org, jiangshanlai@gmail.com,
dipankar@in.ibm.com, akpm@linux-foundation.org,
mathieu.desnoyers@efficios.com, josh@joshtriplett.org,
tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org,
dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com,
oleg@redhat.com, joel@joelfernandes.org,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [PATCH tip/core/rcu 2/4] smp: Add source and destination CPUs to __call_single_data
Date: Thu, 3 Sep 2020 19:42:28 -0700 [thread overview]
Message-ID: <20200904024228.GY29330@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20200904021610.GA7922@debian-boqun.qqnc3lrjykvubdpftowmye0fmh.lx.internal.cloudapp.net>
On Fri, Sep 04, 2020 at 10:16:10AM +0800, Boqun Feng wrote:
> Hi Paul,
>
> On Mon, Aug 31, 2020 at 11:14:15AM -0700, paulmck@kernel.org wrote:
> > From: "Paul E. McKenney" <paulmck@kernel.org>
> >
> > This commit adds a destination CPU to __call_single_data, and is inspired
> > by an earlier commit by Peter Zijlstra. This version adds #ifdef to
> > permit use by 32-bit systems and supplying the destination CPU for all
> > smp_call_function*() requests, not just smp_call_function_single().
> >
> > If need be, 32-bit systems could be accommodated by shrinking the flags
> > field to 16 bits (the atomic_t variant is currently unused) and by
> > providing only eight bits for CPU on such systems.
> >
> > It is not clear that the addition of the fields to __call_single_node
> > are really needed.
> >
> > Link: https://lore.kernel.org/lkml/20200615164048.GC2531@hirez.programming.kicks-ass.net/
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Ingo Molnar <mingo@kernel.org>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > Cc: Frederic Weisbecker <frederic@kernel.org>
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > ---
> > include/linux/smp.h | 3 +++
> > include/linux/smp_types.h | 3 +++
> > kernel/smp.c | 2 ++
> > 3 files changed, 8 insertions(+)
> >
> > diff --git a/include/linux/smp.h b/include/linux/smp.h
> > index 80d557e..9f13966 100644
> > --- a/include/linux/smp.h
> > +++ b/include/linux/smp.h
> > @@ -26,6 +26,9 @@ struct __call_single_data {
> > struct {
> > struct llist_node llist;
> > unsigned int flags;
> > +#ifdef CONFIG_64BIT
> > + u16 src, dst;
> > +#endif
> > };
> > };
> > smp_call_func_t func;
> > diff --git a/include/linux/smp_types.h b/include/linux/smp_types.h
> > index 364b3ae..2e8461a 100644
> > --- a/include/linux/smp_types.h
> > +++ b/include/linux/smp_types.h
> > @@ -61,6 +61,9 @@ struct __call_single_node {
> > unsigned int u_flags;
> > atomic_t a_flags;
> > };
> > +#ifdef CONFIG_64BIT
> > + u16 src, dst;
> > +#endif
> > };
> >
> > #endif /* __LINUX_SMP_TYPES_H */
> > diff --git a/kernel/smp.c b/kernel/smp.c
> > index d0ae8eb..a47382d 100644
> > --- a/kernel/smp.c
> > +++ b/kernel/smp.c
> > @@ -375,6 +375,7 @@ int smp_call_function_single(int cpu, smp_call_func_t func, void *info,
> >
> > csd->func = func;
> > csd->info = info;
> > + csd->dst = cpu;
>
> Would this and the next modification cause compile errors with
> CONFIG_64BIT = n? I saw you add #ifdef guard in the next patch, so maybe
> move those two into next patch (of course, if they trigger compile
> errors)
Good point, will fix, thank you!
Thanx, Paul
> Regards,
> Boqun
>
> >
> > err = generic_exec_single(cpu, csd);
> >
> > @@ -540,6 +541,7 @@ static void smp_call_function_many_cond(const struct cpumask *mask,
> > csd->flags |= CSD_TYPE_SYNC;
> > csd->func = func;
> > csd->info = info;
> > + csd->dst = cpu;
> > if (llist_add(&csd->llist, &per_cpu(call_single_queue, cpu)))
> > __cpumask_set_cpu(cpu, cfd->cpumask_ipi);
> > }
> > --
> > 2.9.5
> >
next prev parent reply other threads:[~2020-09-04 2:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 18:13 [PATCH tip/core/rcu 0/4] Add smp_call_function() debugging for v5.10 Paul E. McKenney
2020-08-31 18:14 ` [PATCH tip/core/rcu 1/4] lib: Add backtrace_idle parameter to force backtrace of idle CPUs paulmck
2020-08-31 18:14 ` [PATCH tip/core/rcu 2/4] smp: Add source and destination CPUs to __call_single_data paulmck
2020-09-04 2:16 ` Boqun Feng
2020-09-04 2:42 ` Paul E. McKenney [this message]
2020-08-31 18:14 ` [PATCH tip/core/rcu 3/4] kernel/smp: Provide CSD lock timeout diagnostics paulmck
2020-09-04 3:19 ` Boqun Feng
2020-09-04 18:09 ` Paul E. McKenney
2020-09-04 3:31 ` Boqun Feng
2020-08-31 18:14 ` [PATCH tip/core/rcu 4/4] smp: Make symbol 'csd_bug_count' static paulmck
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=20200904024228.GY29330@paulmck-ThinkPad-P72 \
--to=paulmck@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bigeasy@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=edumazet@google.com \
--cc=frederic@kernel.org \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®