From: Emil Langrock <emil.langrock@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Andrew Morton <akpm@linux-foundation.org>,
Venkatesh Pallipadi <venki@google.com>
Subject: Recursive deactivation of local bottom halves
Date: Tue, 25 Jan 2011 14:05:14 +0100 [thread overview]
Message-ID: <201101251405.18157.emil.langrock@gmx.de> (raw)
Hi,
I wanted or more or less had to do following:
...
spin_lock_bh(lock1);
....
spin_lock_bh(lock2);
...
spin_unlock_bh(lock2);
....
spin_unlock_bh(lock1);
....
Now some weird behavior were noticed by a second person and he fixed it by
removing the _bh from the inner spinlocks. I checked what the difference is
and here is the previous example without the common spin_lock behaviour:
...
local_bh_disable();
....
local_bh_disable();
...
local_bh_enable();
....
local_bh_enable();
....
According to http://people.netfilter.org/rusty/unreliable-guides/kernel-
hacking/routines-softirqs.html it makes no difference how often I use the pair
local_bh_disable/local_bh_enable inside local_bh_disable/local_bh_enable. So
was this changed?
I also couldn't find any indication in the kernel/softirq.c in the
local_bh_enable functionality that the counting in local_bh_disable makes any
difference.
Can somebody tell me if that is legal or not (on smp and uniprocessor)? And
maybe can show me the related source code why is it may or may not be legal?
Kind regards,
Emil
next reply other threads:[~2011-01-25 13:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-25 13:05 Emil Langrock [this message]
2011-01-25 13:42 ` Thomas Gleixner
2011-01-26 6:20 ` WANG Cong
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=201101251405.18157.emil.langrock@gmx.de \
--to=emil.langrock@gmx.de \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=venki@google.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®