From: "Ulrich Weigand" <Ulrich.Weigand@de.ibm.com>
To: "Manfred Spraul" <manfred@colorfullife.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: NFS deadlock explained (on S/390)
Date: Mon, 3 Sep 2001 14:35:43 +0200 [thread overview]
Message-ID: <OFED05871E.27F0F7FB-ONC1256ABC.0042AF59@de.ibm.com> (raw)
Manfred Spraul:
>I think in_irq() and in_interrupt() should check the cpu interrupt flag
>and return TRUE if the per-cpu interrupts are disabled.
>
>The current behavious is just weird:
> spin_lock_bh();
> in_interrupt(); --> true
> spin_unlock_bh();
> spin_lock_irq();
> in_interrupt(); --> false
> spin_unlock_irq();
I see. Instead of checking the interrupt flag in in_irq(), spin_lock_irq
could also simply increment the local_irq_count, just like spin_lock_bh
increments the local_bh_count.
>> Whether this same situation can explain the deadlocks seen on
>> other platforms depends on whether the drivers used there exhibit
>> similar locking behaviours as the QDIO driver, of course.
>
>It should be possible to detect that automatically: if
>dev_kfree_skb_any() is called outside irq context with disabled per-cpu
>interrupts then it's probably due to a spin_lock_irq() and could
>deadlock.
This would definitely solve the deadlock in our case. However, I'm not
sure this doesn't have some adverse effect on other code; e.g. there are
quite a few routines that use if (!in_interrupt()) as a bug-check, and
some might possibly be called from inside a spin_lock_irq ...
Mit freundlichen Gruessen / Best Regards
Ulrich Weigand
--
Dr. Ulrich Weigand
Linux for S/390 Design & Development
IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
Phone: +49-7031/16-3727 --- Email: Ulrich.Weigand@de.ibm.com
next reply other threads:[~2001-09-03 12:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-03 12:35 Ulrich Weigand [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-08-31 18:02 Manfred Spraul
2001-08-31 16:14 Ulrich Weigand
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=OFED05871E.27F0F7FB-ONC1256ABC.0042AF59@de.ibm.com \
--to=ulrich.weigand@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®