public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vishal Chourasia <vishalc@linux.ibm.com>
To: Mike Galbraith <efault@gmx.de>
Cc: Benjamin Segall <bsegall@google.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	luis.machado@arm.com
Subject: Re: sched/fair: Kernel panics in pick_next_entity
Date: Fri, 4 Oct 2024 12:47:59 +0530	[thread overview]
Message-ID: <Zv-WpzwtDxjY2SLT@linux.ibm.com> (raw)
In-Reply-To: <acad4ac6a2daea2884e8ae4d031dfc8ae30fc365.camel@gmx.de>

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@gmx.de>
Hi Mike, thanks for the patch!

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

Tested-by: Vishal Chourasia <vishalc@linux.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);
> 
> 

      reply	other threads:[~2024-10-04  7:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-26 12:42 sched/fair: Kernel panics in pick_next_entity Vishal Chourasia
2024-09-26 14:31 ` Luis Machado
2024-09-30 14:41 ` Peter Zijlstra
2024-09-30 19:05   ` Vishal Chourasia
2024-09-30 19:15     ` Vishal Chourasia
2024-10-01  8:30       ` Mike Galbraith
2024-10-01 14:08         ` Vishal Chourasia
2024-10-01 16:41           ` Mike Galbraith
2024-10-02  6:40             ` Mike Galbraith
2024-10-02  8:49         ` Peter Zijlstra
2024-10-02 18:22           ` Vishal Chourasia
2024-10-02 22:31         ` Benjamin Segall
2024-10-03  4:41           ` Mike Galbraith
2024-10-03  9:31             ` Mike Galbraith
2024-10-04  7:17               ` Vishal Chourasia [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zv-WpzwtDxjY2SLT@linux.ibm.com \
    --to=vishalc@linux.ibm.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=efault@gmx.de \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luis.machado@arm.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox