From: Davidlohr Bueso <dave@stgolabs.net>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ipc,msg: provide barrier pairings for lockless receive
Date: Thu, 04 Jun 2015 11:56:51 -0700 [thread overview]
Message-ID: <1433444211.2320.29.camel@stgolabs.net> (raw)
In-Reply-To: <1433443289.2320.26.camel@stgolabs.net>
On Thu, 2015-06-04 at 11:41 -0700, Davidlohr Bueso wrote:
> On Thu, 2015-06-04 at 19:57 +0200, Manfred Spraul wrote:
> > On 05/30/2015 02:03 AM, Davidlohr Bueso wrote:
> > > We currently use a full barrier on the sender side to
> > > to avoid receiver tasks disappearing on us while still
> > > performing on the sender side wakeup. We lack however,
> > > the proper CPU-CPU interactions pairing on the receiver
> > > side which busy-waits for the message. Similarly, we do
> > > not need a full smp_mb, and can relax the semantics for
> > > the writer and reader sides of the message. This is safe
> > > as we are only ordering loads and stores to r_msg. And in
> > > both smp_wmb and smp_rmb, there are no stores after the
> > > calls _anyway_.
> > I like the idea, the pairing in ipc is not good.
> > Another one is still open in sem.
>
> Hmm for sems are you referring to spinning on ->status in
> get_queue_result() while another task is performing a wakeup in between
> wake_up_sem_queue_prepare() and wake_up_sem_queue_do()?
>
> >
> > Perhaps we should formalize it a bit more, so that it is easy to find
> > which barrier pair belongs together.
> > It is only an idea, but right now there are too many bugs.
>
> Good point, however, what do you think of the below instead? Makes it
> crystal clear, imho.
We had to do some formalizing in futex too.
> + * Where (A) orders the message value read and where (B) orders
> + * the write to the futex -- done in both pipelined_send and
^^ this should be r_msg
next prev parent reply other threads:[~2015-06-04 18:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-30 0:03 [PATCH 1/2] ipc,shm: move BUG_ON check into shm_lock Davidlohr Bueso
2015-05-30 0:03 ` [PATCH 2/2] ipc,msg: provide barrier pairings for lockless receive Davidlohr Bueso
2015-06-04 17:57 ` Manfred Spraul
2015-06-04 18:41 ` Davidlohr Bueso
2015-06-04 18:56 ` Davidlohr Bueso [this message]
2015-06-01 22:52 ` [PATCH 1/2] ipc,shm: move BUG_ON check into shm_lock Andrew Morton
2015-06-04 0:24 ` Davidlohr Bueso
2015-06-04 0:25 ` Davidlohr Bueso
2015-06-04 18:35 ` Manfred Spraul
2015-06-04 18:58 ` Davidlohr Bueso
2015-06-04 20:31 ` Davidlohr Bueso
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=1433444211.2320.29.camel@stgolabs.net \
--to=dave@stgolabs.net \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.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 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®