From: Nikolay Aleksandrov <nikolay@redhat.com>
To: Ding Tianhong <dingtianhong@huawei.com>
Cc: netdev@vger.kernel.org, andy@greyhouse.net, davem@davemloft.net,
fubar@us.ibm.com
Subject: Re: [PATCH net-next 5/5] bonding: initial RCU conversion
Date: Thu, 01 Aug 2013 09:55:07 +0200 [thread overview]
Message-ID: <51FA145B.3000509@redhat.com> (raw)
In-Reply-To: <51FA0453.5000902@huawei.com>
On 08/01/2013 08:46 AM, Ding Tianhong wrote:
> On 2013/7/31 23:12, Nikolay Aleksandrov wrote:
>> This patch does the initial bonding conversion to RCU. After it the
>> following modes are protected by RCU alone: roundrobin, active-backup,
>> broadcast and xor. Modes ALB/TLB and 3ad still acquire bond->lock for
>> reading, and will be dealt with later. curr_active_slave needs to be
>> dereferenced via rcu in the converted modes because the only thing
>> protecting the slave after this patch is rcu_read_lock, so we need the
>> proper barrier for weakly ordered archs and to make sure we don't have
>> stale pointer. It's not tagged with __rcu yet because there's still work
>> to be done to remove the curr_slave_lock, so sparse will complain when
>> rcu_assign_pointer and rcu_dereference are used, but the alternative to use
>> rcu_dereference_protected would've created much bigger code churn which is
>> more difficult to test and review. That will be converted in time.
>>
>> Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
>
>
> great job! but I think you miss come place to replace by rcu protect.
> example: bonding_show_active_slave() still has curr = bond->curr_active_slave,
> so I think you could replace them all and send together.
>
Thanks, I'll fix this. In fact that code always looked racy to me :)
next prev parent reply other threads:[~2013-08-01 7:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-31 15:12 [PATCH net-next 0/5] bonding: groundwork and initial conversion to RCU Nikolay Aleksandrov
2013-07-31 15:12 ` [PATCH net-next 1/5] bonding: convert to list API and replace bond's custom list Nikolay Aleksandrov
2013-07-31 18:28 ` Jay Vosburgh
2013-07-31 18:42 ` Nikolay Aleksandrov
2013-07-31 18:37 ` Stephen Hemminger
2013-07-31 18:44 ` Nikolay Aleksandrov
2013-07-31 18:56 ` Stephen Hemminger
2013-07-31 19:00 ` Nikolay Aleksandrov
2013-07-31 18:38 ` Stephen Hemminger
2013-07-31 18:49 ` Nikolay Aleksandrov
2013-07-31 15:12 ` [PATCH net-next 2/5] bonding: remove unnecessary read_locks of curr_slave_lock Nikolay Aleksandrov
2013-07-31 15:12 ` [PATCH net-next 3/5] bonding: simplify broadcast_xmit function Nikolay Aleksandrov
2013-07-31 15:12 ` [PATCH net-next 4/5] bonding: factor out slave id tx code and simplify xmit paths Nikolay Aleksandrov
2013-07-31 15:12 ` [PATCH net-next 5/5] bonding: initial RCU conversion Nikolay Aleksandrov
2013-08-01 6:46 ` Ding Tianhong
2013-08-01 7:55 ` Nikolay Aleksandrov [this message]
2013-07-31 15:27 ` [PATCH net-next 0/5] bonding: groundwork and initial conversion to RCU Eric Dumazet
2013-07-31 15:39 ` Nikolay Aleksandrov
2013-07-31 18:03 ` Jiri Pirko
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=51FA145B.3000509@redhat.com \
--to=nikolay@redhat.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=dingtianhong@huawei.com \
--cc=fubar@us.ibm.com \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).