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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250207123620.GA10324@noisy.programming.kicks-ass.net>
Date: Fri, 7 Feb 2025 13:36:20 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: zihan zhou <15645113830zzh@...il.com>
Cc: mingo@...hat.com, juri.lelli@...hat.com, vincent.guittot@...aro.org,
	dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
	mgorman@...e.de, vschneid@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V1] sched: Cancel the slice protection of the idle entity

On Tue, Jan 21, 2025 at 11:06:29AM +0800, zihan zhou wrote:
> A wakeup non-idle entity should preempt idle entity at any time,
> but because of the slice protection of the idle entity, the non-idle
> entity has to wait, so just cancel it.
> 
> Signed-off-by: zihan zhou <15645113830zzh@...il.com>
> ---
>  kernel/sched/fair.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 3e9ca38512de..7777d110d053 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -8851,8 +8851,19 @@ static void check_preempt_wakeup_fair(struct rq *rq, struct task_struct *p, int
>  	 * Preempt an idle entity in favor of a non-idle entity (and don't preempt
>  	 * in the inverse case).
>  	 */
> -	if (cse_is_idle && !pse_is_idle)
> +	if (cse_is_idle && !pse_is_idle) {
> +
> +		/*
> +		 * When non-idle entity preempt an idle entity,
> +		 * don't give idle entity slice protection.
> +		 */
> +		if (se->vlag == se->deadline)
> +			se->vlag = se->deadline + 1;
> +
>  		goto preempt;
> +
> +	}

Yes, I suppose we can do this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ