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] [day] [month] [year] [list]
Date:   Mon, 22 Jul 2019 21:20:46 +0000
From:   Nadav Amit <namit@...are.com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     Andy Lutomirski <luto@...nel.org>,
        the arch/x86 maintainers <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>
Subject: Re: [RFC 7/7] x86/current: Aggressive caching of current

> On Jul 22, 2019, at 2:07 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> 
> On Thu, Jul 18, 2019 at 10:41:10AM -0700, Nadav Amit wrote:
>> The current_task is supposed to be constant in each thread and therefore
>> does not need to be reread. There is already an attempt to cache it
>> using inline assembly, using this_cpu_read_stable(), which hides the
>> dependency on the read memory address.
> 
> Is that what it does?!, I never quite could understand
> percpu_stable_op().

That’s my understanding. I am not too pleased that I could not come up with
a general alternative to this_cpu_read_stable(), mainly because gcc does not
provide a way to get the type without the segment qualifier. Anyhow,
“current” seems to be the main pain-point.

I think a similar const-alias approach can also be used for stuff like
boot_cpu_has(). I have some patches for that somewhere, but the impact is
smaller. I do see some small, but measurable performance improvements with
this series. I’ll try to incorporate them in v1 once I have time.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ