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:   Fri, 22 Jun 2018 09:01:04 -0700
From:   Andy Lutomirski <luto@...nel.org>
To:     Rik van Riel <riel@...riel.com>
Cc:     Andrew Lutomirski <luto@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Mike Galbraith <efault@....de>, songliubraving@...com,
        kernel-team <kernel-team@...com>
Subject: Re: [PATCH 7/7] x86,idle: do not leave mm in idle state

Hmm, fair enough.  I think a better heuristic would be if the
estimated idle duration is more than, say, 10ms.  I *think* the code
has been cleaned up enough that this is easy now.  (Using time instead
of C6 will make it a lot less dependent on which idle driver is in
use.)
On Fri, Jun 22, 2018 at 8:53 AM Rik van Riel <riel@...riel.com> wrote:
>
> On Fri, 2018-06-22 at 08:36 -0700, Andy Lutomirski wrote:
> > On Wed, Jun 20, 2018 at 12:57 PM Rik van Riel <riel@...riel.com>
> > wrote:
> > >
> > > Do not call leave_mm when going into a cstate. Now that mprotect
> > > and
> > > madvise no longer send IPIs for TLB shootdowns to idle CPUs, there
> > > is
> > > no real reason to disable lazy TLB mode in idle states.
> > >
> > > This seems to help performance on Broadwell systems. Haswell
> > > performance
> > > numbers are inconclusive.
> >
> > I'm skeptical.  The code you're removing is more about power
> > consumption than about performance.  If a task migrates from one cpu
> > to another, runs for awhile, and exits, we don't want to IPI the old
> > CPU if the old CPU is deeply asleep.  The logic you're removing is a
> > bit awkwardly written, but the intent is to only do the leave_mm() in
> > deep sleep.  We should arguably change the condition to check the
> > expected sleep duration instead of the microarchitectural properties
> > of the target state, though.
>
> That is fair.
>
> A quick hack could be to just remove the tlb flush
> from C3 state (which gets called a lot), but keep
> it for C6 state and deeper (which get called more
> when a CPU is really idle).
>
> --
> All Rights Reversed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ