From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Corcodel Marian <corcodel.marian@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>, linux-kernel@vger.kernel.org
Subject: Re: Function rcu_dynticks_eqs_exit spent more cycles to processor
Date: Sun, 25 Nov 2018 14:35:13 -0800 [thread overview]
Message-ID: <20181125223513.GE4170@linux.ibm.com> (raw)
In-Reply-To: <1543174886.3486.4.camel@gmail.com>
On Sun, Nov 25, 2018 at 09:41:26PM +0200, Corcodel Marian wrote:
> Hi below , in modified func from kernel/rcu/tree.c and not stall proc,
> run perf for more info.
> Item type atomic_t dynticks from rcu_dynticks stucture can bee replaced
> with u8 type, because Intel guarrantee atomic operations to byte.
> Eg, rtdp->dynticks = ~RCU_DYNTICK_CTRL_MASK;
I am not clear on exactly what change you are suggesting. But regardless,
this is core code, so it must run on all CPUs that the Linux kernel
supports, not just Intel x86. Furthermore, a straight store of
~RCU_DYNTICK_CTRL_MASK would be rather destructive in this function,
if that is what you are getting at with your assignment statement above.
So again, I am not clear on exactly what change you are suggesting, but
whatever it is, it must build and run on all architectures.
Adding LKML on CC, develop in the open and all that.
Thanx, Paul
> static void rcu_dynticks_eqs_exit(void)
> {
> struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
>
> /*
> * CPUs seeing atomic_add_return() must see prior idle
> sojourns,
> * and we also must force ordering with the next RCU read-side
> * critical section.
> */
> atomic_andnot(RCU_DYNTICK_CTRL_MASK, &rdtp->dynticks);
> smp_mb__after_atomic(); /* _exit after clearing mask.
> */
> /* Prefer duplicate flushes to losing a flush. */
> rcu_eqs_special_exit();
> }
>
parent reply other threads:[~2018-11-25 22:35 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1543174886.3486.4.camel@gmail.com>]
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=20181125223513.GE4170@linux.ibm.com \
--to=paulmck@linux.ibm.com \
--cc=corcodel.marian@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
/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