Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1489959 > unrolled thread

Re: [PATCH] softirq: let ksoftirqd do its job

Started byDaniel Borkmann <daniel@iogearbox.net>
First post2016-09-23 13:40 +0200
Last post2016-09-23 23:20 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] softirq: let ksoftirqd do its job Daniel Borkmann <daniel@iogearbox.net> - 2016-09-23 13:40 +0200
    Re: [PATCH] softirq: let ksoftirqd do its job Peter Zijlstra <peterz@infradead.org> - 2016-09-23 14:00 +0200
      Re: [PATCH] softirq: let ksoftirqd do its job Jesper Dangaard Brouer <jbrouer@redhat.com> - 2016-09-23 19:00 +0200
        Re: [PATCH] softirq: let ksoftirqd do its job Peter Zijlstra <peterz@infradead.org> - 2016-09-23 23:20 +0200

#1489959 — Re: [PATCH] softirq: let ksoftirqd do its job

FromDaniel Borkmann <daniel@iogearbox.net>
Date2016-09-23 13:40 +0200
SubjectRe: [PATCH] softirq: let ksoftirqd do its job
Message-ID<skwZH-31N-3@gated-at.bofh.it>
On 09/02/2016 08:39 AM, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Wed, 31 Aug 2016 10:42:29 -0700
>
>> From: Eric Dumazet <edumazet@google.com>
>>
>> A while back, Paolo and Hannes sent an RFC patch adding threaded-able
>> napi poll loop support : (https://patchwork.ozlabs.org/patch/620657/)
>>
>> The problem seems to be that softirqs are very aggressive and are often
>> handled by the current process, even if we are under stress and that
>> ksoftirqd was scheduled, so that innocent threads would have more chance
>> to make progress.
>>
>> This patch makes sure that if ksoftirq is running, we let it
>> perform the softirq work.
>>
>> Jonathan Corbet summarized the issue in https://lwn.net/Articles/687617/
>>
>> Tested:
>>
>>   - NIC receiving traffic handled by CPU 0
>>   - UDP receiver running on CPU 0, using a single UDP socket.
>>   - Incoming flood of UDP packets targeting the UDP socket.
>>
>> Before the patch, the UDP receiver could almost never get cpu cycles and
>> could only receive ~2,000 packets per second.
>>
>> After the patch, cpu cycles are split 50/50 between user application and
>> ksoftirqd/0, and we can effectively read ~900,000 packets per second,
>> a huge improvement in DOS situation. (Note that more packets are now
>> dropped by the NIC itself, since the BH handlers get less cpu cycles to
>> drain RX ring buffer)
>>
>> Since the load runs in well identified threads context, an admin can
>> more easily tune process scheduling parameters if needed.
>>
>> Reported-by: Paolo Abeni <pabeni@redhat.com>
>> Reported-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>
> I'm just kind of assuming this won't go through my tree, but I can take
> it if that's what everyone agrees to.

Was this actually picked up somewhere in the mean time?

[toc] | [next] | [standalone]


#1489971

FromPeter Zijlstra <peterz@infradead.org>
Date2016-09-23 14:00 +0200
Message-ID<skxj4-38t-9@gated-at.bofh.it>
In reply to#1489959
On Fri, Sep 23, 2016 at 01:35:59PM +0200, Daniel Borkmann wrote:
> On 09/02/2016 08:39 AM, David Miller wrote:
> >
> >I'm just kind of assuming this won't go through my tree, but I can take
> >it if that's what everyone agrees to.
> 
> Was this actually picked up somewhere in the mean time?

I can queue it for tip. In fact, I've just done so to avoid loosing it.
If anybody else wants it holler.

[toc] | [prev] | [next] | [standalone]


#1490330

FromJesper Dangaard Brouer <jbrouer@redhat.com>
Date2016-09-23 19:00 +0200
Message-ID<skBZo-6mq-21@gated-at.bofh.it>
In reply to#1489971
On Fri, 23 Sep 2016 13:53:33 +0200
Peter Zijlstra <peterz@infradead.org> wrote:

> On Fri, Sep 23, 2016 at 01:35:59PM +0200, Daniel Borkmann wrote:
> > On 09/02/2016 08:39 AM, David Miller wrote:  
> > >
> > >I'm just kind of assuming this won't go through my tree, but I can take
> > >it if that's what everyone agrees to.  
> > 
> > Was this actually picked up somewhere in the mean time?  
> 
> I can queue it for tip. In fact, I've just done so to avoid loosing it.
> If anybody else wants it holler.

Good that you are picking this up! It is a very important fix, as least
for networking.

This is your git tree, right:
 https://git.kernel.org/cgit/linux/kernel/git/peterz/queue.git/

Doesn't look like you pushed it yet, or do I need to look at a specific
branch?

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer

[toc] | [prev] | [next] | [standalone]


#1490463

FromPeter Zijlstra <peterz@infradead.org>
Date2016-09-23 23:20 +0200
Message-ID<skG30-yx-19@gated-at.bofh.it>
In reply to#1490330
On Fri, Sep 23, 2016 at 06:51:04PM +0200, Jesper Dangaard Brouer wrote:

> This is your git tree, right:
>  https://git.kernel.org/cgit/linux/kernel/git/peterz/queue.git/
> 
> Doesn't look like you pushed it yet, or do I need to look at a specific
> branch?

I mainly work from a local quilt queue which I feed to mingo. I
occasionally push out to get build-bot coverage or have people look at
bits I poked together.

That said, I'll try and do a push later tonight.

Do note however, that git tree is a complete wipe and rebuild, don't
expect any kind of continuity from it.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web