From: "Chris Friesen" <cfriesen@nortel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Thomas Gleixner <tglx@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>,
David Miller <davem@davemloft.net>,
linuxppc-dev@ozlabs.org, paulus@samba.org,
netdev@vger.kernel.org
Subject: Re: question about softirqs
Date: Tue, 12 May 2009 09:18:19 -0600 [thread overview]
Message-ID: <4A09933B.8010606@nortel.com> (raw)
In-Reply-To: <20090512081237.GA16403@elte.hu>
Ingo Molnar wrote:
> * Chris Friesen <cfriesen@nortel.com> wrote:
>>I think I see a possible problem with this. Suppose I have a
>>SCHED_FIFO task spinning on recvmsg() with MSG_DONTWAIT set. Under
>>the scenario above, schedule() would re-run the spinning task
>>rather than ksoftirqd, thus preventing any incoming packets from
>>being sent up the stack until we get a real hardware
>>interrupt--which could be a whole jiffy if interrupt mitigation is
>>enabled in the net device.
>>DaveM pointed out that if we're doing transmits we're likely to
>>hit local_bh_enable(), which would process the softirq work.
>>However, I think we may still have a problem in the above rx-only
>>scenario--or is it too contrived to matter?
> This could occur, and the problem is really that task priorities do
> not extend across softirq work processing.
>
> This could occur in ordinary SCHED_OTHER tasks as well, if the
> softirq is bounced to ksoftirqd - which it only should be if there's
> serious softirq overload - or, as you describe it above, if the
> softirq is raised in process context:
One of the reasons I brought up this issue is that there is a lot of
documentation out there that says "softirqs will be processed on return
from a syscall". The fact that it actually depends on the scheduler
parameters of the task issuing the syscall isn't ever mentioned.
In fact, "Documentation/DocBook/kernel-hacking.tmpl" in the kernel
source still has the following:
Whenever a system call is about to return to userspace, or a
hardware interrupt handler exits, any 'software interrupts'
which are marked pending (usually by hardware interrupts) are
run (<filename>kernel/softirq.c</filename>).
If anyone is looking at changing this code, it might be good to ensure
that at least the kernel docs are updated.
Chris
next prev parent reply other threads:[~2009-05-12 15:18 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <18948.63755.279732.294842@cargo.ozlabs.ibm.com>
[not found] ` <20090508.234815.127227651.davem@davemloft.net>
[not found] ` <4A086DB2.8040703@nortel.com>
[not found] ` <20090511.162436.193717082.davem@davemloft.net>
2009-05-12 0:43 ` question about softirqs Chris Friesen
2009-05-12 8:12 ` Ingo Molnar
2009-05-12 9:12 ` Peter Zijlstra
2009-05-12 9:23 ` Ingo Molnar
2009-05-12 9:32 ` Peter Zijlstra
2009-05-12 12:20 ` Steven Rostedt
2009-05-13 4:45 ` David Miller
2009-05-13 4:44 ` David Miller
2009-05-13 5:15 ` Paul Mackerras
2009-05-13 5:28 ` David Miller
2009-05-13 5:55 ` Evgeniy Polyakov
2009-05-12 15:18 ` Chris Friesen [this message]
2009-05-13 8:34 ` Andi Kleen
2009-05-13 13:23 ` Chris Friesen
2009-05-13 14:15 ` Andi Kleen
2009-05-13 14:17 ` Thomas Gleixner
2009-05-13 14:24 ` Andi Kleen
2009-05-13 14:54 ` Eric Dumazet
2009-05-13 15:02 ` Andi Kleen
2009-05-13 15:05 ` Chris Friesen
2009-05-13 15:54 ` Thomas Gleixner
2009-05-13 16:10 ` Chris Friesen
2009-05-13 17:01 ` Andi Kleen
2009-05-13 19:04 ` Chris Friesen
2009-05-13 19:13 ` Andi Kleen
2009-05-13 19:44 ` Chris Friesen
2009-05-13 19:53 ` Andi Kleen
2009-05-13 20:55 ` Thomas Gleixner
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=4A09933B.8010606@nortel.com \
--to=cfriesen@nortel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=davem@davemloft.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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).