From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
To: zyjzyj2000@gmail.com, j.vosburgh@gmail.com, vfalico@gmail.com,
gospo@cumulusnetworks.com, netdev@vger.kernel.org
Subject: Re: [PATCH 1/1] bond: relocate rcu_read_lock and rcu_read_unlock
Date: Mon, 1 Feb 2016 12:01:56 +0100 [thread overview]
Message-ID: <56AF3B24.7000207@cumulusnetworks.com> (raw)
In-Reply-To: <1454297472-24261-1-git-send-email-zyjzyj2000@gmail.com>
On 02/01/2016 04:31 AM, zyjzyj2000@gmail.com wrote:
> From: Zhu Yanjun <zyjzyj2000@gmail.com>
>
> rcu_read_lock and rcu_read_unlock are to protect the function
> bond_miimon_inspect. As such, moving rcu_read_lock and rcu_read_unlock
> to the function bond_miimon_inspect to make the source code compact.
>
> CC: Jay Vosburgh <j.vosburgh@gmail.com>
> CC: Veaceslav Falico <vfalico@gmail.com>
> CC: Andy Gospodarek <gospo@cumulusnetworks.com>
> Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com>
> ---
> drivers/net/bonding/bond_main.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
Not true, RCU also protects the slave dereference in bond_should_notify_peers().
Even though there's already a rcu_read_lock() while doing the dereference
itself, it is there only to please RCU, IIRC. The only "simplification" you
can do is remove the rcu_read_lock/unlock() around the slave deref in
bond_should_notify_peers and use rcu_dereference_rtnl() as it can be used either
in RCU protected region or with RTNL held. Also I think net-next is still
closed (and that's where this should be targeted at).
Cheers,
Nik
next prev parent reply other threads:[~2016-02-01 11:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 3:31 [PATCH 1/1] bond: relocate rcu_read_lock and rcu_read_unlock zyjzyj2000
2016-02-01 11:01 ` Nikolay Aleksandrov [this message]
2016-02-01 11:08 ` Nikolay Aleksandrov
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=56AF3B24.7000207@cumulusnetworks.com \
--to=nikolay@cumulusnetworks.com \
--cc=gospo@cumulusnetworks.com \
--cc=j.vosburgh@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vfalico@gmail.com \
--cc=zyjzyj2000@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.