From: Erik Hugne <erik.hugne@ericsson.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [Question] Kernel preemption of BH handler
Date: Mon, 26 Mar 2012 11:20:43 +0200 [thread overview]
Message-ID: <4F7034EB.8010707@ericsson.com> (raw)
I have a BH handler that processes packets received from a netdevice.
my_bh_handler() {
spin_lock_bh(my_lock);
/*do stuff*/
spin_unlock_bh(my_lock);
/*do more stuff*/
}
First packet is received, and my_bh_handler() is currently processing it.
Now a new packet is received by the NIC and my_bh_handler() is preempted
after my_lock have been released.
Is it possible that the second invocation of the BH routine is allowed
to finish before the first?
//E
next reply other threads:[~2012-03-26 9:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-26 9:20 Erik Hugne [this message]
2012-03-26 14:56 ` [Question] Kernel preemption of BH handler Ben Hutchings
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=4F7034EB.8010707@ericsson.com \
--to=erik.hugne@ericsson.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).