All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier@cisco.com>
To: Andrew Morton <akpm@osdl.org>, mst@mellanox.co.il
Cc: Roland Dreier <rolandd@cisco.com>,
	linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: Re: [git patch review 1/4] IPoIB: Don't start send-only joins while multicast thread is stopped
Date: Sat, 11 Feb 2006 18:03:18 -0800	[thread overview]
Message-ID: <ada8xsh49ll.fsf@cisco.com> (raw)
In-Reply-To: <20060211140209.57af1b16.akpm@osdl.org> (Andrew Morton's message of "Sat, 11 Feb 2006 14:02:09 -0800")

 > Roland Dreier <rolandd@cisco.com> wrote:
 > >
 > >  +	spin_lock_irq(&priv->lock);
 > >  +	set_bit(IPOIB_MCAST_STARTED, &priv->flags);
 > >  +	spin_unlock_irq(&priv->lock);
 > 
 > Strange to put a lock around an atomic op like that.
 > 
 > Sometimes it's valid.   If another cpu was doing:
 > 
 > 	spin_lock(lock);
 > 
 > 	if (test_bit(IPOIB_MCAST_STARTED))
 > 		something();
 > 	...
 > 	if (test_bit(IPOIB_MCAST_STARTED))
 > 		something_else();
 > 
 > 	spin_unlock(lock);
 > 
 > then the locked set_bit() makes sense.
 > 
 > But often it doesn't ;)

Good point.  Michael, any reason why the lock is there around the
set_bit()?  (And similarly for the corresponding clear_bit())

Thanks,
 Roland

  reply	other threads:[~2006-02-12  2:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-11 20:22 [git patch review 1/4] IPoIB: Don't start send-only joins while multicast thread is stopped Roland Dreier
2006-02-11 20:22 ` [git patch review 2/4] IPoIB: Fix another send-only join race Roland Dreier
2006-02-11 20:22   ` [git patch review 3/4] IB/mthca: Don't print debugging info until we have all values Roland Dreier
2006-02-11 20:22     ` [git patch review 4/4] IPoIB: Yet another fix for send-only joins Roland Dreier
2006-02-11 22:02 ` [git patch review 1/4] IPoIB: Don't start send-only joins while multicast thread is stopped Andrew Morton
2006-02-12  2:03   ` Roland Dreier [this message]
2006-02-12  7:50     ` [openib-general] " Michael S. Tsirkin
2006-02-12  8:13       ` Kyle Moffett
2006-02-12  8:19         ` Michael S. Tsirkin
2006-02-12 16:37       ` [openib-general] " Roland Dreier
2006-02-12 16:56         ` Michael S. Tsirkin

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=ada8xsh49ll.fsf@cisco.com \
    --to=rdreier@cisco.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@mellanox.co.il \
    --cc=openib-general@openib.org \
    --cc=rolandd@cisco.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.