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:   Tue, 11 Jun 2019 11:01:45 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Fenghua Yu <fenghua.yu@...el.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        H Peter Anvin <hpa@...or.com>,
        Andy Lutomirski <luto@...nel.org>,
        Ashok Raj <ashok.raj@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Ravi V Shankar <ravi.v.shankar@...el.com>,
        linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>
Subject: Re: [PATCH v4 0/5] x86/umwait: Enable user wait instructions

On Fri, Jun 07, 2019 at 03:00:32PM -0700, Fenghua Yu wrote:
> Today, if an application needs to wait for a very short duration
> they have to have spinloops. Spinloops consume more power and continue
> to use execution resources that could hurt its thread siblings in a core
> with hyperthreads. New instructions umonitor, umwait and tpause allow
> a low power alternative waiting at the same time could improve the HT
> sibling perform while giving it any power headroom. These instructions
> can be used in both user space and kernel space.
> 
> A new MSR IA32_UMWAIT_CONTROL allows kernel to set a time limit in
> TSC-quanta that prevents user applications from waiting for a long time.
> This allows applications to yield the CPU and the user application
> should consider using other alternatives to wait.

I'm confused on the purpose of this control; what do we win by limiting
this time?

>  .../ABI/testing/sysfs-devices-system-cpu      |  21 ++
>  arch/x86/include/asm/cpufeatures.h            |   1 +
>  arch/x86/include/asm/msr-index.h              |   4 +
>  arch/x86/power/Makefile                       |   1 +
>  arch/x86/power/umwait.c                       | 182 ++++++++++++++++++

You seem to miss the arch/x86/lib/delay.c change to use this fancy new
stuff for udelay(). I'm thinking that's exactly what TPAUSE is good for.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ