All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ding Tianhong <dingtianhong@huawei.com>
To: Nikolay Aleksandrov <nikolay@redhat.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, 1 Aug 2013 14:46:43 +0800	[thread overview]
Message-ID: <51FA0453.5000902@huawei.com> (raw)
In-Reply-To: <1375283553-32070-6-git-send-email-nikolay@redhat.com>

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.

  reply	other threads:[~2013-08-01  6:48 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 [this message]
2013-08-01  7:55     ` Nikolay Aleksandrov
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=51FA0453.5000902@huawei.com \
    --to=dingtianhong@huawei.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=fubar@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@redhat.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.