From: Tejun Heo <tj@kernel.org>
To: "Zhangqiao (2012 lab)" <zhangqiao22@huawei.com>
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: Tue, 16 Jul 2024 10:48:22 -1000 [thread overview]
Message-ID: <ZpbclgFjf_q6PSd1@slm.duckdns.org> (raw)
In-Reply-To: <ba2702f9-f66e-498b-853c-d23f1f9191bc@huawei.com>
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
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.
--
tejun
next prev parent reply other threads:[~2024-07-16 20:48 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 [this message]
2024-07-17 2:01 ` Zhangqiao (2012 lab)
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=ZpbclgFjf_q6PSd1@slm.duckdns.org \
--to=tj@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=void@manifault.com \
--cc=zhangqiao22@huawei.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