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
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Chuck Ebbert
Re: PCI: Unable to reserve mem region problem
Linus Torvalds
Linux 2.6.34-rc4
Thomas Taranowski
[PATCH] RapidIO: Fix hang on RapidIO doorbell queue full condition
git
:
Ralf Wildenhues
[PATCH] Fix typos in the documentation
Len Brown
Re: fatal: unable to create '.git/index': File exists
Denis Bueno
Git clone error
Sam Vilain
Re: RFC: Flat directory for notes, or fan-out? Both!
Oliver Hoffmann
git init --bare versus git --bare init
git-commits-head
:
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
nfsd41: sanity check client drc maxreqs
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
V4L/DVB: gspca - sonixj: Adjust minor values of sensor ov7630. - set the color ga...
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Sam Fourman Jr.
Re: Help with Altell PC6700
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
linux-netdev
:
Kurt Van Dijck
Re: [PATCH net-next-2.6 1/2] can: add driver for Softing card
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
David Miller
Re: [PATCH v2] net: typos in comments in include/linux/igmp.h
Colocation donated by:
Syndicate