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: <20210714082820.GB2725@worktop.programming.kicks-ass.net>
Date:   Wed, 14 Jul 2021 10:28:20 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Davidlohr Bueso <dave@...olabs.net>
Subject: Re: [patch 05/50] sched: Provide schedule point for RT locks

On Tue, Jul 13, 2021 at 05:10:59PM +0200, Thomas Gleixner wrote:

> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -5832,8 +5832,14 @@ pick_next_task(struct rq *rq, struct tas
>   */
>  #define	SM_NONE			0x0
>  #define	SM_PREEMPT		0x1
> -#define SM_MASK_PREEMPT		UINT_MAX
> -#define SM_MASK_STATE		SM_MASK_PREEMPT
> +#ifndef CONFIG_PREEMPT_RT
> +# define SM_MASK_PREEMPT	UINT_MAX
> +# define SM_MASK_STATE		SM_MASK_PREEMPT
> +#else
> +# define SM_RTLOCK_WAIT		0x2
> +# define SM_MASK_PREEMPT	SM_PREEMPT
> +# define SM_MASK_STATE		(SM_PREEMPT | SM_RTLOCK_WAIT)
> +#endif

Wouldn't something like this:


#ifndef CONFIG_PREEMPT_RT
# define SM_MASK_PREEMPT        (~0U)
#else
# define SM_RTLOCK_WAIT         0x2
# define SM_MASK_PREEMPT        SM_PREEMPT
#endif

#define SM_MASK_STATE          (~0U)

Be even better?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ