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] [day] [month] [year] [list]
Message-ID: <Zv-WpzwtDxjY2SLT@linux.ibm.com>
Date: Fri, 4 Oct 2024 12:47:59 +0530
From: Vishal Chourasia <vishalc@...ux.ibm.com>
To: Mike Galbraith <efault@....de>
Cc: Benjamin Segall <bsegall@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>, linux-kernel@...r.kernel.org,
        Ingo Molnar <mingo@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>, Mel Gorman <mgorman@...e.de>,
        Valentin Schneider <vschneid@...hat.com>, luis.machado@....com
Subject: Re: sched/fair: Kernel panics in pick_next_entity

On Thu, Oct 03, 2024 at 11:31:06AM +0200, Mike Galbraith wrote:
> On Thu, 2024-10-03 at 06:41 +0200, Mike Galbraith wrote:
> > On Wed, 2024-10-02 at 15:31 -0700, Benjamin Segall wrote:
> 
> > > Whether dequeue_entity + enqueue_entity is better or worse than
> > > requeue_delayed_entity (+break), I really don't know.
> >
> > Hm, I'd say requeue_delayed_entity() not only fits better, it using
> > less lines gives it an extra brownie point.
> 
> Probable not worth any churn or effort, but it is an option.
> 
> sched: Clean up sched_delayed handling in unthrottle_cfs_rq()
> 
> requeue_delayed_entity() achieves and documents in one line what a less
> clear preparatory dequeue facilitates over several, so use it instead,
> and remove the superfluous comment.
> 
> Signed-off-by: Mike Galbraith <efault@....de>
Hi Mike, thanks for the patch!

I didn't see any warnings or kernel panics in my setup. 

Tested-by: Vishal Chourasia <vishalc@...ux.ibm.com>
> ---
>  kernel/sched/fair.c |    9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6058,12 +6058,9 @@ void unthrottle_cfs_rq(struct cfs_rq *cf
>  	for_each_sched_entity(se) {
>  		struct cfs_rq *qcfs_rq = cfs_rq_of(se);
> 
> -		/* Handle any unfinished DELAY_DEQUEUE business first. */
> -		if (se->sched_delayed) {
> -			int flags = DEQUEUE_SLEEP | DEQUEUE_DELAYED;
> -
> -			dequeue_entity(qcfs_rq, se, flags);
> -		} else if (se->on_rq)
> +		if (se->sched_delayed)
> +			requeue_delayed_entity(se);
> +		if (se->on_rq)
>  			break;
>  		enqueue_entity(qcfs_rq, se, ENQUEUE_WAKEUP);
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ