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]
Message-ID: <20180130063002.gxmruvxcqsfp5hv4@gmail.com>
Date:   Tue, 30 Jan 2018 07:30:02 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Anna-Maria Gleixner <anna-maria@...utronix.de>
Subject: Re: [GIT pull] Timer core updates for 4.16


* Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> On Mon, Jan 29, 2018 at 12:48 AM, Thomas Gleixner <tglx@...utronix.de> wrote:
> >
> >   - A rather large rework of the hrtimer infrastructure which introduces
> >     softirq based hrtimers to replace the spread of hrtimer/tasklet combos
> >     which force the actual callback execution into softirq context.
> 
> I really would have liked to see more of the rationale for this - now
> I'm left with just two example drivers, and a "you'll see the cleanups
> this allows in future driver pulls".
> 
> But pulled, since the code doesn't look disgusting.

Sorry, this is my fault: from Anna-Maria's original, full softirq-hrtimers series 
I didn't apply many of the usecases, because we didn't get any review feedback 
from the networking folks:

 can/bcm: Replace hrtimer_tasklet with softirq based hrtimer

   net/can/bcm.c | 156 ++++++++++++++++++++--------------------------------------
   1 file changed, 52 insertions(+), 104 deletions(-)

 mac80211_hwsim: Replace hrtimer tasklet with softirq hrtimer

   drivers/net/wireless/mac80211_hwsim.c | 44 ++++++++++++++++-------------------
   1 file changed, 20 insertions(+), 24 deletions(-)

 xfrm: Replace hrtimer tasklet with softirq hrtimer

   include/net/xfrm.h    |  2 +-
   net/xfrm/xfrm_state.c | 30 ++++++++++++++++++------------
   2 files changed, 19 insertions(+), 13 deletions(-)

 net/mvpp2: Replace tasklet with softirq hrtimer

   drivers/net/ethernet/marvell/mvpp2.c | 62 +++++++++++++++---------------------
   1 file changed, 25 insertions(+), 37 deletions(-)

And I felt uneasy about applying this in one go, so we decided to apply it in two 
phases.

These are in cases significant driver simplifications, but they also enable the 
real deal, the elimination of the hrtimer tasklet:

 softirq: Remove tasklet_hrtimer

   include/linux/interrupt.h | 25 -----------------------
   kernel/softirq.c          | 51 -----------------------------------------------
   2 files changed, 76 deletions(-)

... which is a pretty nice thing in itself even without the driver 
simplifications!

Plus the _real_ secret motivation behind it all is the -rt kernel and 
CONFIG_PREEMPT_RT=y and the ability to push most of the hrtimer processing into 
softirq context - while it still keeps the main hrtimer machinery capable to run 
in hard-RT hardirq domain. Turns out it was possible to implement this duality via 
the softirq-hrtimers, with a good chunk of benefits to non-rt upstream as well.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ