* [RFC] Core Scheduling unnecessary force idle?
@ 2023-11-29 8:53 Benjamin Tang
2023-11-29 10:17 ` Peter Zijlstra
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Tang @ 2023-11-29 8:53 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot
Cc: Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
Daniel Bristot de Oliveira, Valentin Schneider, linux-kernel,
Benjamin Tang
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!
Best Wishes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Core Scheduling unnecessary force idle?
2023-11-29 8:53 [RFC] Core Scheduling unnecessary force idle? Benjamin Tang
@ 2023-11-29 10:17 ` Peter Zijlstra
2023-11-29 11:35 ` Benjamin Tang
0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2023-11-29 10:17 UTC (permalink / raw)
To: Benjamin Tang
Cc: Ingo Molnar, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
Steven Rostedt, Ben Segall, Mel Gorman,
Daniel Bristot de Oliveira, Valentin Schneider, linux-kernel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Core Scheduling unnecessary force idle?
2023-11-29 10:17 ` Peter Zijlstra
@ 2023-11-29 11:35 ` Benjamin Tang
0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Tang @ 2023-11-29 11:35 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Ingo Molnar, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
Steven Rostedt, Ben Segall, Mel Gorman,
Daniel Bristot de Oliveira, Valentin Schneider, linux-kernel,
Benjamin Tang
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-29 11:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 8:53 [RFC] Core Scheduling unnecessary force idle? Benjamin Tang
2023-11-29 10:17 ` Peter Zijlstra
2023-11-29 11:35 ` Benjamin Tang
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®