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  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, 23 Sep 2020 17:12:34 -0400
From:   Steven Rostedt <>
To:     Thomas Gleixner <>
        Linus Torvalds <>,
        LKML <>,
        linux-arch <>,
        Paul McKenney <>,
        the arch/x86 maintainers <>,
        Sebastian Andrzej Siewior <>,
        Juri Lelli <>,
        Vincent Guittot <>,
        Dietmar Eggemann <>,
        Ben Segall <>, Mel Gorman <>,
        Daniel Bristot de Oliveira <>,
        Will Deacon <>,
        Andrew Morton <>,
        Linux-MM <>,
        Russell King <>,
        Linux ARM <>,
        Chris Zankel <>,
        Max Filippov <>,,
        Jani Nikula <>,
        Joonas Lahtinen <>,
        Rodrigo Vivi <>,
        David Airlie <>,
        Daniel Vetter <>,
        intel-gfx <>,
        dri-devel <>,
        Ard Biesheuvel <>,
        Herbert Xu <>,
        Vineet Gupta <>,
        "open list\:SYNOPSYS ARC ARCHITECTURE" 
        Arnd Bergmann <>, Guo Ren <>,, Michal Simek <>,
        Thomas Bogendoerfer <>,, Nick Hu <>,
        Greentime Hu <>,
        Vincent Chen <>,
        Michael Ellerman <>,
        Benjamin Herrenschmidt <>,
        Paul Mackerras <>,
        linuxppc-dev <>,
        "David S. Miller" <>,
        linux-sparc <>
Subject: Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of
 kmap_atomic & friends

On Wed, 23 Sep 2020 22:55:54 +0200
Thomas Gleixner <> wrote:

> > Perhaps make migrate_disable() an anonymous local_lock()?
> >
> > This should lower the SHC in theory, if you can't have stacked migrate
> > disables on the same CPU.  
> I'm pretty sure this ends up in locking hell pretty fast and aside of
> that it's not working for scenarios like:
>      kmap_local();
>        migrate_disable();
>        ...
>      copy_from_user()
>         -> #PF
>            -> schedule()  
> which brought us into that discussion in the first place. You would stop
> any other migrate disable user from running until the page fault is
> resolved...

Then scratch the idea of having anonymous local_lock() and just bring
local_lock in directly? Then have a kmap local lock, which would only
block those that need to do a kmap.

Now as for migration disabled nesting, at least now we would have
groupings of this, and perhaps the theorists can handle that. I mean,
how is this much different that having a bunch of tasks blocked on a
mutex with the owner is pinned on a CPU?

migrate_disable() is a BKL of pinning affinity. If we only have
local_lock() available (even on !RT), then it makes the blocking in
groups. At least this way you could grep for all the different
local_locks in the system and plug that into the algorithm for WCS,
just like one would with a bunch of mutexes.

-- Steve

Powered by blists - more mailing lists