lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 17 Jan 2018 23:00:37 +0100 (CET)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
cc:     David Miller <davem@...emloft.net>, Mike Galbraith <efault@....de>,
        Peter Zijlstra <peterz@...radead.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Dmitry Safonov <dima@...sta.com>,
        Frederic Weisbecker <frederic@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Dmitry Safonov <0x7f454c46@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Frederic Weisbecker <fweisbec@...il.com>,
        Hannes Frederic Sowa <hannes@...essinduktion.org>,
        Ingo Molnar <mingo@...nel.org>,
        Sasha Levin <alexander.levin@...izon.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Paul McKenney <paulmck@...ux.vnet.ibm.com>,
        Radu Rendec <rrendec@...sta.com>,
        Rik van Riel <riel@...hat.com>,
        Stanislaw Gruszka <sgruszka@...hat.com>,
        Wanpeng Li <wanpeng.li@...mail.com>
Subject: Re: [RFC 1/2] softirq: Defer net rx/tx processing to ksoftirqd
 context

On Wed, 17 Jan 2018, Linus Torvalds wrote:

> On Wed, Jan 17, 2018 at 1:54 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
> > raise_softirq() -> raise_softirq_irqoff()
> >
> >         set_softirq_bit();
> >
> >         if (!in_interrupt())
> >                 wake_softirqd();
> >
> > So if the caller is not in hard or soft interrupt context, which includes
> > bottom half disabled regions softirqd is woken.
> 
> That does seem unnecessarily expensive, and maybe we could just do it
> with thread flag (TIF_NOTIFY_RESUME or whatever).
> 
> In fact, that was what I *thought* we did. Maybe I just remember some
> historical behavior.
> 
> Since networking seems to largely prefer softirqd anyway, maybe that
> wake_softirqd() is the right thing to do anyway.

Well, but we only do it when we are not in a bh disabled region. The places
where thread context raises the network softirqs is usually inside a bh
disabled region, so the softirq is executed on local_bh_enable(). The
thread is woken up rarely.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ