netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: Makito SHIOKAWA <mshiokawa@miraclelinux.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 4/4] bonding: Fix some RTNL taking
Date: Thu, 17 Jan 2008 12:46:55 +0100	[thread overview]
Message-ID: <20080117114655.GC1710@ff.dom.local> (raw)
In-Reply-To: <478EE7FD.3010802@miraclelinux.com>

On Thu, Jan 17, 2008 at 02:30:37PM +0900, Makito SHIOKAWA wrote:
>> Maybe I'm wrong, but since this read_lock() is given and taken anyway,
>> it seems this looks a bit better to me (why hold this rtnl longer
>> than needed?):
>> 		read_unlock(&bond->lock);
>> 		rtnl_unlock();
>> 		read_lock(&bond->lock);
> Seems better.
>
>> On the other hand, probably 'if (bond->kill_timers)' could be repeated
>> after this read_lock() retaking.
> Sorry, what do you mean? (A case that bond->kill_timers = 1 is done during 
> lock retaking, and work being queued only to do 'if (bond->kill_timers)'? 
> If so, I think that won't differ much.)

Probably the difference is not much, but since this all double locking,
unlocking and something between could take a while, and such a check
looks cheaper than re-queueing... But I don't persist in this.

Jarek P.

  reply	other threads:[~2008-01-17 11:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-15  6:36 [PATCH 0/4] bonding: Fix workqueue manipulation and lock taking Makito SHIOKAWA
2008-01-15  6:36 ` [PATCH 1/4] bonding: Fix work initing and cancelling Makito SHIOKAWA
2008-01-15 10:56   ` Jarek Poplawski
2008-01-16  5:17     ` Makito SHIOKAWA
2008-01-15  6:36 ` [PATCH 2/4] bonding: Add destroy_workqueue() to bond device destroying process Makito SHIOKAWA
2008-01-15  6:36 ` [PATCH 3/4] bonding: Fix work rearming Makito SHIOKAWA
2008-01-15  9:05   ` Jarek Poplawski
2008-01-16  3:19     ` Makito SHIOKAWA
2008-01-16 13:36       ` Jarek Poplawski
2008-01-17  5:30         ` Makito SHIOKAWA
2008-01-17 11:18           ` Jarek Poplawski
2008-01-18 13:43             ` Makito SHIOKAWA
2008-01-18 22:27               ` Jarek Poplawski
2008-01-18 22:43                 ` Jarek Poplawski
2008-01-21  4:04                   ` Makito SHIOKAWA
2008-01-21 13:33                     ` Jarek Poplawski
2008-01-22  3:35                       ` Makito SHIOKAWA
2008-01-16  3:28     ` Makito SHIOKAWA
2008-01-15  6:36 ` [PATCH 4/4] bonding: Fix some RTNL taking Makito SHIOKAWA
2008-01-16 12:44   ` Jarek Poplawski
2008-01-17  5:30     ` Makito SHIOKAWA
2008-01-17 11:46       ` Jarek Poplawski [this message]
2008-01-18  9:06         ` Makito SHIOKAWA

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=20080117114655.GC1710@ff.dom.local \
    --to=jarkao2@gmail.com \
    --cc=mshiokawa@miraclelinux.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).