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: <aNJKVav0vog6_Smc@gpd4>
Date: Tue, 23 Sep 2025 09:20:53 +0200
From: Andrea Righi <arighi@...dia.com>
To: Tejun Heo <tj@...nel.org>
Cc: David Vernet <void@...ifault.com>, Changwoo Min <changwoo@...lia.com>,
	linux-kernel@...r.kernel.org, sched-ext@...ts.linux.dev
Subject: Re: [PATCH 2/7] sched_ext: Improve SCX_KF_DISPATCH comment

On Sun, Sep 21, 2025 at 03:32:41PM -1000, Tejun Heo wrote:
> The comment for SCX_KF_DISPATCH was incomplete and didn't explain that
> ops.dispatch() may temporarily release the rq lock, allowing ENQUEUE and
> SELECT_CPU operations to be nested inside DISPATCH contexts.
> 
> Update the comment to clarify this nesting behavior and provide better
> context for when these operations can occur within dispatch.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>

Looks good.

Acked-by: Andrea Righi <arighi@...dia.com>

> ---
>  include/linux/sched/ext.h | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/sched/ext.h b/include/linux/sched/ext.h
> index 7047101dbf58..d82b7a9b0658 100644
> --- a/include/linux/sched/ext.h
> +++ b/include/linux/sched/ext.h
> @@ -108,7 +108,11 @@ enum scx_kf_mask {
>  	SCX_KF_UNLOCKED		= 0,	  /* sleepable and not rq locked */
>  	/* ENQUEUE and DISPATCH may be nested inside CPU_RELEASE */
>  	SCX_KF_CPU_RELEASE	= 1 << 0, /* ops.cpu_release() */
> -	/* ops.dequeue (in REST) may be nested inside DISPATCH */
> +	/*
> +	 * ops.dispatch() may release rq lock temporarily and thus ENQUEUE and
> +	 * SELECT_CPU may be nested inside. ops.dequeue (in REST) may also be
> +	 * nested inside DISPATCH.
> +	 */
>  	SCX_KF_DISPATCH		= 1 << 1, /* ops.dispatch() */
>  	SCX_KF_ENQUEUE		= 1 << 2, /* ops.enqueue() and ops.select_cpu() */
>  	SCX_KF_SELECT_CPU	= 1 << 3, /* ops.select_cpu() */
> -- 
> 2.51.0
> 

Thanks,
-Andrea

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ