From: Eric Dumazet <eric.dumazet@gmail.com>
To: paulmck@linux.vnet.ibm.com
Cc: David Miller <davem@davemloft.net>,
shemminger@vyatta.com, mchan@broadcom.com,
linux-kernel@vger.kernel.org
Subject: Re: RCU: how to suppress warnings from rcu_assign_pointer?
Date: Mon, 01 Aug 2011 10:47:33 +0200 [thread overview]
Message-ID: <1312188453.2719.1.camel@edumazet-laptop> (raw)
In-Reply-To: <20110801052342.GD2307@linux.vnet.ibm.com>
Le dimanche 31 juillet 2011 à 22:23 -0700, Paul E. McKenney a écrit :
> Thanx, Paul
>
> ------------------------------------------------------------------------
>
> rcu: Make rcu_assign_pointer() unconditionally insert a memory barrier
>
> Recent changes to gcc give warning messages on rcu_assign_pointers()'s
> checks that allow it to determine when it is OK to omit the memory
> barrier. Stephen Hemminger tried a number of gcc tricks to silence
> this warning, but #pragmas and CPP macros do not work together in the
> way that would be required to make this work.
>
> However, we now have RCU_INIT_POINTER(), which already omits this
> memory barrier, and which therefore may be used when assigning NULL to
> an RCU-protected pointer that is accessible to readers. This commit
> therefore makes rcu_assign_pointer() unconditionally emit the memory
> barrier.
>
> Reported-by: Stephen Hemminger <shemminger@vyatta.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Acked-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
>
Sure Paul, thanks for doing this. I have _very_ limited access to
Internet this week.
Eric
next prev parent reply other threads:[~2011-08-01 8:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110728142723.77a2c308@nehalam.ftrdhcpuser.net>
[not found] ` <20110728214442.GV2403@linux.vnet.ibm.com>
[not found] ` <20110728145510.0ec0db01@nehalam.ftrdhcpuser.net>
[not found] ` <20110729003843.GA2373@linux.vnet.ibm.com>
2011-07-29 17:50 ` Stephen Hemminger
2011-07-30 12:17 ` Eric Dumazet
2011-07-31 3:16 ` David Miller
2011-08-01 5:23 ` Paul E. McKenney
2011-08-01 8:47 ` Eric Dumazet [this message]
2011-08-01 16:19 ` [PATCH] rcu: convert uses of rcu_assign_pointer(x, NULL) to RCU_INIT_POINTER Stephen Hemminger
2011-08-02 5:44 ` David Miller
2011-08-02 10:32 ` Paul E. McKenney
2011-08-02 11:29 ` David Miller
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=1312188453.2719.1.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mchan@broadcom.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=shemminger@vyatta.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®