linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Reshetova, Elena" <elena.reshetova@intel.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Andrea Parri <andrea.parri@amarulasolutions.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"keescook@chromium.org" <keescook@chromium.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Dmitry Vyukov <dvyukov@google.com>
Subject: RE: [PATCH] refcount_t: add ACQUIRE ordering on success for dec(sub)_and_test variants
Date: Tue, 29 Jan 2019 13:39:17 +0000	[thread overview]
Message-ID: <2236FBA76BA1254E88B949DDB74E612BA4B98D02@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <20190129095144.GH28467@hirez.programming.kicks-ass.net>

 
> On Mon, Jan 28, 2019 at 03:29:10PM +0100, Andrea Parri wrote:
> 
> > > diff --git a/arch/x86/include/asm/refcount.h b/arch/x86/include/asm/refcount.h
> > > index dbaed55..ab8f584 100644
> > > --- a/arch/x86/include/asm/refcount.h
> > > +++ b/arch/x86/include/asm/refcount.h
> > > @@ -67,16 +67,29 @@ static __always_inline void refcount_dec(refcount_t *r)
> > >  static __always_inline __must_check
> > >  bool refcount_sub_and_test(unsigned int i, refcount_t *r)
> > >  {
> > > -	return GEN_BINARY_SUFFIXED_RMWcc(LOCK_PREFIX "subl",
> > > +	bool ret = GEN_BINARY_SUFFIXED_RMWcc(LOCK_PREFIX "subl",
> > >
> REFCOUNT_CHECK_LT_ZERO,
> > >  					 r-
> >refs.counter, e, "er", i, "cx");
> > > +
> > > +    if (ret) {
> > > +               smp_acquire__after_ctrl_dep();
> > > +               return true;
> > > +    }
> > > +
> > > +    return false;
> >
> > There appears to be some white-space damage (here and in other places);
> > checkpatch.pl should point these and other style problems out.
> 
> It's worse...
> 
> patch: **** malformed patch at line 81: diff --git
> a/arch/x86/include/asm/refcount.h b/arch/x86/include/asm/refcount.h
> 
> And yes, there's a lot of whitespace damage all around. Lots of trailing
> spaces too.


I am very sorry about this, smth is really wrong with my system, in addition to all
above, I haven't even received Andrea reply to my inbox, neither this patch itself. 

I will fix all the whitespacing/trailing stuff and address this comment from Andrea:

"Mmh, this property (A-cumulativity) isn't really associated to ACQUIREs
in the LKMM; I'd suggest to simply remove the last sentence."

Anything else that needs fixing, content-wise? 

Best Regards,
Elena.


  reply	other threads:[~2019-01-29 13:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28 12:09 [PATCH] refcount_t: add ACQUIRE ordering on success for dec(sub)_and_test variants Elena Reshetova
2019-01-28 14:29 ` Andrea Parri
2019-01-29  9:51   ` Peter Zijlstra
2019-01-29 13:39     ` Reshetova, Elena [this message]
2019-01-29 14:00 ` Dmitry Vyukov
2019-01-29 17:37   ` Reshetova, Elena
2019-01-30  3:33     ` Andrea Parri
2019-01-30 10:19       ` Reshetova, Elena
2019-01-30 10:34         ` Dmitry Vyukov
2019-01-30 11:18 [PATCH v2] Adding smp_acquire__after_ctrl_dep barrier Elena Reshetova
2019-01-30 11:18 ` [PATCH] refcount_t: add ACQUIRE ordering on success for dec(sub)_and_test variants Elena Reshetova
2019-01-30 12:31   ` Andrea Parri
2019-01-30 14:21     ` Peter Zijlstra

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=2236FBA76BA1254E88B949DDB74E612BA4B98D02@IRSMSX102.ger.corp.intel.com \
    --to=elena.reshetova@intel.com \
    --cc=andrea.parri@amarulasolutions.com \
    --cc=dvyukov@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=stern@rowland.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).