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: <87v8c6ukxm.ffs@tglx>
Date:   Tue, 19 Sep 2023 19:33:57 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Anton Ivanov <anton.ivanov@...bridgegreys.com>,
        Richard Weinberger <richard@....at>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
        Matthew Wilcox <willy@...radead.org>,
        torvalds <torvalds@...ux-foundation.org>,
        Ankur Arora <ankur.a.arora@...cle.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-mm <linux-mm@...ck.org>, x86 <x86@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andy Lutomirski <luto@...nel.org>, bp <bp@...en8.de>,
        dave hansen <dave.hansen@...ux.intel.com>, hpa <hpa@...or.com>,
        mingo <mingo@...hat.com>, juri lelli <juri.lelli@...hat.com>,
        vincent guittot <vincent.guittot@...aro.org>, mgorman@...e.de,
        Steven Rostedt <rostedt@...dmis.org>,
        jon grimm <jon.grimm@....com>, bharata@....com,
        raghavendra kt <raghavendra.kt@....com>,
        boris ostrovsky <boris.ostrovsky@...cle.com>,
        konrad wilk <konrad.wilk@...cle.com>, jgross <jgross@...e.com>,
        andrew cooper3 <andrew.cooper3@...rix.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        linux-m68k <linux-m68k@...ts.linux-m68k.org>,
        Johannes Berg <johannes@...solutions.net>,
        linux-um <linux-um@...ts.infradead.org>,
        Brian Cain <bcain@...cinc.com>, linux-hexagon@...r.kernel.org,
        Richard Henderson <richard.henderson@...aro.org>,
        Ivan Kokshaysky <ink@...assic.park.msu.ru>,
        Matt Turner <mattst88@...il.com>,
        linux-alpha <linux-alpha@...r.kernel.org>
Subject: Re: Arches that don't support PREEMPT

On Tue, Sep 19 2023 at 17:41, Anton Ivanov wrote:
> On 19/09/2023 17:22, Richard Weinberger wrote:
>> ----- Ursprüngliche Mail -----
>>> Von: "anton ivanov" <anton.ivanov@...bridgegreys.com>
>>> It's been a while. I remember that I dropped it at the time, but do not remember
>>> the full details.
>>>
>>> There was some stuff related to FP state and a few other issues I ran into while
>>> rewriting the interrupt controller. Some of it may be resolved by now as we are
>>> using host cpu flags, etc.
>> 
>> I remember also having a hacky but working version almost 10 years ago.
>> It was horrible slow because of the extra scheduler rounds.

Which can be completely avoided as the proposed change will have the
preemption points, but they are only utilized when preempt FULL is
enabled (at boot or runtime). So the behaviour can still be like preempt
NONE, but with a twist to get rid of the cond_resched()/might_resched()
and other heuristic approaches to prevent starvation by long running
functions. That twist needs the preemption points.

See https://lore.kernel.org/lkml/87cyyfxd4k.ffs@tglx

>> But yes, if PREEMPT will be a must-have feature we'll have to try again.
>
> We will need proper fpu primitives for starters that's for
> sure. fpu_star/end in UML are presently NOOP.
>
> Some of the default spinlocks and other stuff which we pick up from
> generic may need to change as well.
>
> This is off the top of my head and something which we can fix straight
> away. I will send some patches to the mailing list tomorrow or on Thu.

I think it does not have to be perfect. UM is far from perfect in
mimicing a real kernel. The main point is that it provides the preempt
counter in the first place and some minimal amount of preemption points
aside of those which come with the preempt_enable() machinery for free.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ