[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A09933B.8010606@nortel.com>
Date: Tue, 12 May 2009 09:18:19 -0600
From: "Chris Friesen" <cfriesen@...tel.com>
To: Ingo Molnar <mingo@...e.hu>
CC: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Thomas Gleixner <tglx@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>,
David Miller <davem@...emloft.net>, linuxppc-dev@...abs.org,
paulus@...ba.org, netdev@...r.kernel.org
Subject: Re: question about softirqs
Ingo Molnar wrote:
> * Chris Friesen <cfriesen@...tel.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists