login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
December
»
30
Re: Question about in_interrupt() semantics with regard to softirqs.
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Yong Zhang
Subject:
Re: Question about in_interrupt() semantics with regard to softirqs.
Date: Wednesday, December 29, 2010 - 7:15 pm
On Thu, Dec 30, 2010 at 4:27 AM, Justin Seyster <jrseys@gmail.com> wrote:
quoted text
> I'm trying to understand the in_interrupt() function, and it seems > that it will return true for normal, non-interrupt code that disables > bottom half processing. It looks like that behavior is intentional, > but I don't understand why it's designed that way. I'm sorry if I'm > stating something obvious here; it would help me a lot if somebody > double checked my reasoning! > > in_interrupt() checks a hardirq count and a softirq count, but I found > out that these two counts behave very differently. The hardirq count > tracks the nesting depth of hardware interrupts (which is what I would > expect), but the softirq count behaves like the preempt count, > tracking whether softirqs are currently enabled. > > So if normal code (executing on behalf of a user process) disables > softirqs with local_bh_disable(), it will get a true return value from > in_interrupt() until it finally reenables them. But disabling > hardirqs will not have the same effect: the hardirq count is > unchanged, and in_interrupt() will still return false. > > My question is: is there a design decision for this asymmetry between > hard and softirqs? Also, is there a function that does what I really > wanted, which is to return true iff execution is actually in > bottom-half context?
For the function you want, you can take a look at commit: 75e1056f5c57050415b64cb761a3acc35d91f013 Thanks, Yong -- Only stand for myself --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
Question about in_interrupt() semantics with regard to sof ...
, Justin Seyster
, (Wed Dec 29, 1:27 pm)
Re: Question about in_interrupt() semantics with regard to ...
, Yong Zhang
, (Wed Dec 29, 7:15 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 041/196] kobject: add kobject_init_and_add function
Lukas Hejtmanek
Re: Another libata error related to OCZ SSD
Greg Kroah-Hartman
[PATCH 023/196] MCP_UCB1200: Convert from class_device to device
Florian Fainelli
Re: System clock runs too fast after 2.6.27 -> 2.6.28.1 upgrade
Christoph Lameter
[patch 1/4] mmu_notifier: Core code
git
:
Johannes Schindelin
Re: [PATCH 1/2] Add strbuf_initf()
John Bito
[EGIT] Push to GitHub caused corruption
Jakub Narebski
Re: [PATCH 0/2] gitweb: patch view
Junio C Hamano
Re: [PATCH] When a remote is added but not fetched, tell the user.
Andy Parkins
Re: [RFC] Submodules in GIT
git-commits-head
:
Linux Kernel Mailing List
ahci: Workaround HW bug for SB600/700 SATA controller PMP support
Linux Kernel Mailing List
V4L/DVB (11086): au0828: rename macro for currently non-function VBI support
Linux Kernel Mailing List
ceph: client types
Linux Kernel Mailing List
ceph: on-wire types
Linux Kernel Mailing List
crypto: chainiv - Use kcrypto_wq instead of keventd_wq
linux-netdev
:
Andrew Morton
Re: [Bugme-new] [Bug 14969] New: b44: WOL does not work in suspended state
Giuseppe CAVALLARO
Re: [PATCH 03/13] stmmac: add the new Header file for stmmac platform data
Taku Izumi
[PATCH 3/3] ixgbe: add registers etc. printout code just before resetting adapters
Eric Dumazet
rps: some comments
Thomas Gleixner
Re: [RFC PATCH 02/12] On Tue, 23 Sep 2008, David Miller wrote:
openbsd-misc
:
Stephan Andreas
problems with login after xlock in OpenBSD release 4.7
pmc
Make A Change. Alcoholism and Drug Addiction Treatment
ropers
Re: what exactly is enc0?
Fuad NAHDI
Re: What does your environment look like?
Matthew Szudzik
Typo on OpenBSD 4.4 CD Set
Colocation donated by:
Syndicate