mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Henry Huang <henry.hj@antgroup.com>
Cc: void@manifault.com, 谈鉴锋 <henry.tjf@antgroup.com>,
	"Yan Yan(cailing)" <yanyan.yan@antgroup.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sched_ext: keep running prev when prev->scx.slice != 0
Date: Wed, 8 Jan 2025 06:45:57 -1000	[thread overview]
Message-ID: <Z36rxeV8n7H-o4cP@slm.duckdns.org> (raw)
In-Reply-To: <20250108084710.42747-2-henry.hj@antgroup.com>

On Wed, Jan 08, 2025 at 04:47:10PM +0800, Henry Huang wrote:
> When %SCX_OPS_ENQ_LAST is set and prev->scx.slice != 0,
> @prev will be dispacthed into the local DSQ in put_prev_task_scx().
> However, pick_task_scx() is executed before put_prev_task_scx(),
> so it will not pick @prev.
> Set %SCX_RQ_BAL_KEEP in balance_one() to ensure that pick_task_scx()
> can pick @prev.
> 
> Signed-off-by: Henry Huang <henry.hj@antgroup.com>

Applied to sched_ext/for-6.13-fixes with a minor edit (see below).

> @@ -2747,6 +2747,7 @@ static int balance_one(struct rq *rq, struct task_struct *prev)
>  {
>  	struct scx_dsp_ctx *dspc = this_cpu_ptr(scx_dsp_ctx);
>  	bool prev_on_scx = prev->sched_class == &ext_sched_class;
> +	bool prev_on_rq = (prev->scx.flags & SCX_TASK_QUEUED) != 0;

I dropped `!= 0` as the bool assignment cast already implies boolean
conversion.

Thanks.

-- 
tejun

      reply	other threads:[~2025-01-08 16:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08  8:47 Henry Huang
2025-01-08  8:47 ` Henry Huang
2025-01-08 16:45   ` Tejun Heo [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=Z36rxeV8n7H-o4cP@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=henry.hj@antgroup.com \
    --cc=henry.tjf@antgroup.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=void@manifault.com \
    --cc=yanyan.yan@antgroup.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

all inboxes | Powered by JetHome®