From: Benjamin Tang <tangsong8264@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Valentin Schneider <vschneid@redhat.com>,
linux-kernel@vger.kernel.org,
Benjamin Tang <tangsong8264@gmail.com>
Subject: Re: [RFC] Core Scheduling unnecessary force idle?
Date: Wed, 29 Nov 2023 19:35:59 +0800 [thread overview]
Message-ID: <1226de2e-7930-440e-9a27-b6f0c138c433@gmail.com> (raw)
In-Reply-To: <20231129101710.GB30650@noisy.programming.kicks-ass.net>
In general scenarios, the number of tagged tasks should be less.
Is it feasible to maintain the leftmost untagged node?
在 2023/11/29 下午6:17, Peter Zijlstra 写道:
> On Wed, Nov 29, 2023 at 04:53:35PM +0800, Benjamin Tang wrote:
>> When I'm reading the code related to "core scheduling", I have a question.
>>
>> Say the RQs in a particular core look like this:
>> Let CFS1 and CFS4 be 2 untagged CFS tasks.
>> Let CFS2 and CFS3 be 2 untagged CFS tasks.
>>
>> rq0 rq1
>> CFS1(no tag) CFS3(tagged)
>> CFS2(tagged) CFS4(no tag)
>>
>> Say schedule() runs on rq0. In the core-wide pick logic, if I'm not
>> mistaken,
>> the end result of the selection will be (say prio(CFS1) > prio(CFS3)):
>>
>> rq0 rq1
>> CFS1(no tag) IDLE
>>
>> Why not consider trying to find untagged tasks for rq1 here?
>> Is it because it seems less fair, or are there other considerations?
>>
>> I would be very grateful if someone could give me some suggestions.
>> Thanks!
> Because it's expensive to unconditionally track the untagged tasks. I
> suppose it could be fixed by iterating the task-set when we
> enable/disable core-scheduling, but that's going to be somewhat painful.
>
> A work-around would be to always tag everything, eg. have an explicit
> 'rest' tag.
prev parent reply other threads:[~2023-11-29 11:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-29 8:53 Benjamin Tang
2023-11-29 10:17 ` Peter Zijlstra
2023-11-29 11:35 ` Benjamin Tang [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=1226de2e-7930-440e-9a27-b6f0c138c433@gmail.com \
--to=tangsong8264@gmail.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®