lkml.org 
[lkml]   [2014]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] softirq: punt to ksoftirqd if __do_softirq recently looped
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


\
 
 \ /
  Last update: 2014-04-12 02:21    [W:0.075 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site