Re: [PATCH v2 3/3] sched/fair: do not scribble cache-hot CPU in select_idle_cpu()

From: Chen Yu
Date: Thu Nov 30 2023 - 01:43:22 EST


Hi Madadi,

On Thu, Nov 30, 2023 at 1:26 AM Madadi Vineeth Reddy
<vineethr@xxxxxxxxxxxxx> wrote:
>
> Hi Chen Yu,
>
[snip...]

>
> As per my understanding, if the task which tagged a particular CPU as cache hot has woken up before
> the cache_hot_timeout, we still don't allow that task to run on that particular CPU. Is this correct?
>

Not exactly. When we reached select_idle_cpu(), we have already
checked if the wakee's previous CPU
is idle or not in select_idle_sibling(), if it is idle, we don't check
the cache-hot tag and return the wakee's
previous CPU directly in select_idle_sibling().

thanks,
Chenyu

> If correct, then why don't we let the task to select the CPU if it's the one that tagged it?
>
> Thanks and Regards
> Madadi Vineeth Reddy