[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <51FA145B.3000509@redhat.com>
Date: Thu, 01 Aug 2013 09:55:07 +0200
From: Nikolay Aleksandrov <nikolay@...hat.com>
To: Ding Tianhong <dingtianhong@...wei.com>
CC: netdev@...r.kernel.org, andy@...yhouse.net, davem@...emloft.net,
fubar@...ibm.com
Subject: Re: [PATCH net-next 5/5] bonding: initial RCU conversion
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@...hat.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 :)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists