[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51FA0453.5000902@huawei.com>
Date: Thu, 1 Aug 2013 14:46:43 +0800
From: Ding Tianhong <dingtianhong@...wei.com>
To: Nikolay Aleksandrov <nikolay@...hat.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 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.
--
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