public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Zhangqiao (2012 lab)" <zhangqiao22@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: <void@manifault.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH sched_ext/for-6.11] sched_ext: Reverting @p->sched_class if @p->disallow is set
Date: Wed, 17 Jul 2024 10:01:13 +0800	[thread overview]
Message-ID: <cd3fa16d-5a70-4c85-a591-fa4fa481f50b@huawei.com> (raw)
In-Reply-To: <ZpbclgFjf_q6PSd1@slm.duckdns.org>



在 2024/7/17 4:48, Tejun Heo 写道:
> Hello,
>
> On Tue, Jul 16, 2024 at 07:32:09PM +0800, Zhangqiao (2012 lab) wrote:
>> 在 2024/7/12 2:57, Tejun Heo 写道:
>>> On Thu, Jul 11, 2024 at 07:07:20PM +0800, Zhangqiao (2012 lab) wrote:
>>> ...
>>>>    		if (p->policy == SCHED_EXT) {
>>>>    			p->policy = SCHED_NORMAL;
>>>> +			p->sched_class = &fair_sched_class;
>>>>    			atomic_long_inc(&scx_nr_rejected);
>>> Did you see any issues with the existing implementation? The policy is set
>>> before the task is attached, so it should work fine. Also, you can't change
>>> sched_class by just assigning to it.
>> What does "attach" mean? I'm not sure. p->sched_class is assigned in
>> __sched_fork() which is performed before scx_ops_init_task().
> Ah, I see what you mean. I was referring to the classs switching operations
> in scx_ops_enable(). You're looking at the fork path. I don't think we can

Yes, i was referring to the fork path.

> switch sched_class at that point and the .disallow mechanism is there to
> allow the scheduler to filter out tasks on scheduler start. I'll update the
> code so that .disallow is only allowed during the initial attach.
>
> Thanks.
>


  reply	other threads:[~2024-07-17  2:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-11 11:07 [PATCH sched_ext/for-6.11] sched_ext: Reverting @p->sched_class if @p->disallow is set Zhangqiao (2012 lab)
2024-07-11 18:57 ` Tejun Heo
2024-07-16 11:32   ` Zhangqiao (2012 lab)
2024-07-16 20:48     ` Tejun Heo
2024-07-17  2:01       ` Zhangqiao (2012 lab) [this message]
2024-07-17 17:49         ` Tejun Heo
2024-07-18  6:04           ` Zhangqiao (2012 lab)
2024-07-31 19:14             ` [PATCH sched_ext/for-6.12] sched_ext: Allow p->scx.disallow only while loading Tejun Heo
2024-07-31 20:33               ` David Vernet
2024-08-01 23:32                 ` [PATCH v2 " Tejun Heo
2024-08-02  0:21                   ` David Vernet
2024-08-02 18:59                   ` Tejun Heo

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=cd3fa16d-5a70-4c85-a591-fa4fa481f50b@huawei.com \
    --to=zhangqiao22@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=void@manifault.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