From: Rik van Riel <riel@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
jbenc@redhat.com, peterz@infradead.org, tglx@linutronix.de,
fweisbec@gmail.com
Subject: Re: [PATCH] softirq: punt to ksoftirqd if __do_softirq recently looped
Date: Fri, 11 Apr 2014 20:02:25 -0400 [thread overview]
Message-ID: <53488291.1040501@redhat.com> (raw)
In-Reply-To: <20140411.163342.1319748709214614224.davem@davemloft.net>
On 04/11/2014 04:33 PM, David Miller wrote:
> From: Rik van Riel <riel@redhat.com>
> Date: Thu, 10 Apr 2014 11:57:06 -0400
>
>> @@ -330,7 +334,11 @@ void irq_enter(void)
>>
>> static inline void invoke_softirq(void)
>> {
>> - if (!force_irqthreads) {
>> + /*
>> + * If force_irqthreads is set, or if we looped in __do_softirq this
>> + * jiffie, punt to ksoftirqd to prevent userland starvation.
>> + */
>> + if (!force_irqthreads && this_cpu_read(softirq_looped) != jiffies) {
>
> If we do this, which I'm not convinced of yet, I think we should use two
> jiffies as the cutoff.
I am not fully convinced, either. This patch mostly just illustrates
the problem, and gives something that solves Jiri's immediate problem.
It is quite likely that there is a better way to solve the problem of:
1) softirq handling starving out userspace processing,
2) which could be solved by moving the userspace process elsewhere, and
3) shifting softirq processing to ksoftirqd
A working patch seems to be one of the better ways to start a
discussion, though.
If anybody has a nicer idea on how to solve the problem, I'd even be
willing to implement your idea, and give Jiri another patch to test :)
--
All rights reversed
prev parent reply other threads:[~2014-04-12 0:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 15:57 [PATCH] softirq: punt to ksoftirqd if __do_softirq recently looped Rik van Riel
2014-04-10 18:15 ` Eric Dumazet
2014-04-11 20:33 ` David Miller
2014-04-12 0:02 ` Rik van Riel [this message]
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=53488291.1040501@redhat.com \
--to=riel@redhat.com \
--cc=davem@davemloft.net \
--cc=fweisbec@gmail.com \
--cc=jbenc@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.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).