LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Cypher Wu <cypher.w@gmail.com>
To: "Américo Wang" <xiyou.wangcong@gmail.com>
Cc: linux-kernel@vger.kernel.org, Chris Metcalf <cmetcalf@tilera.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	netdev <netdev@vger.kernel.org>
Subject: Re: Fwd: IGMP and rwlock: Dead ocurred again on TILEPro
Date: Thu, 17 Feb 2011 14:42:35 +0800	[thread overview]
Message-ID: <AANLkTi=Z6=5v3vKwu1HZsB1CBQ_acdmjbVG4PZbfM_OC@mail.gmail.com> (raw)
In-Reply-To: <20110217054237.GB2653@cr0.nay.redhat.com>

On Thu, Feb 17, 2011 at 1:42 PM, Américo Wang <xiyou.wangcong@gmail.com> wrote:
> On Thu, Feb 17, 2011 at 01:04:14PM +0800, Cypher Wu wrote:
>>>
>>> Have you turned CONFIG_LOCKDEP on?
>>>
>>> I think Eric already converted that rwlock into RCU lock, thus
>>> this problem should disappear. Could you try a new kernel?
>>>
>>> Thanks.
>>>
>>
>>I haven't turned CONFIG_LOCKDEP on for test since I didn't get too
>>much information when we tried to figured out the former deadlock.
>>
>>IGMP used read_lock() instead of read_lock_bh() since usually
>>read_lock() can be called recursively, and today I've read the
>>implementation of MIPS, it's should also works fine in that situation.
>>The implementation of TILEPro cause problem since after it use TNS set
>>the lock-val to 1 and hold the original value and before it re-set
>>lock-val a new value, it a race condition window.
>>
>
> I see no reason why you can't call read_lock_bh() recursively,
> read_lock_bh() is roughly equalent to local_bh_disable() + read_lock(),
> both can be recursive.
>
> But I may miss something here. :-/
>

Of course read_lock_bh() can be called recursively, but read_lock() is
already enough for IGMP, the only reason for that deadlock is because
using TNS instruction set the value to 1 cause another race condition.

-- 
Cyberman Wu

  parent reply	other threads:[~2011-02-17  6:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17  3:39 Cypher Wu
2011-02-17  4:49 ` Américo Wang
2011-02-17  5:04   ` Cypher Wu
2011-02-17  5:42     ` Américo Wang
2011-02-17  5:46       ` David Miller
2011-02-17  6:39         ` Eric Dumazet
2011-02-17 22:49         ` Chris Metcalf
2011-02-17 22:53           ` David Miller
2011-02-17 23:04             ` Chris Metcalf
2011-02-17 23:11               ` David Miller
2011-02-17 23:18                 ` Chris Metcalf
2011-02-18  3:16                   ` Cypher Wu
2011-02-18  3:19                   ` Cypher Wu
2011-02-18  7:08                   ` Cypher Wu
2011-02-18 21:51                     ` Chris Metcalf
2011-02-19  4:07                       ` Cypher Wu
2011-02-20 13:33                         ` Chris Metcalf
2011-03-01 18:30                     ` [PATCH] arch/tile: fix deadlock bugs in rwlock implementation Chris Metcalf
2011-02-17  6:42       ` Cypher Wu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-02-17  2:17 Fwd: IGMP and rwlock: Dead ocurred again on TILEPro Cypher Wu

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='AANLkTi=Z6=5v3vKwu1HZsB1CBQ_acdmjbVG4PZbfM_OC@mail.gmail.com' \
    --to=cypher.w@gmail.com \
    --cc=cmetcalf@tilera.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    --subject='Re: Fwd: IGMP and rwlock: Dead ocurred again on TILEPro' \
    /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

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).