Re: [PATCH] sched/core: forced idle accounting

From: Josh Don
Date: Fri Oct 08 2021 - 17:04:19 EST


On Thu, Oct 7, 2021 at 5:08 PM Josh Don <joshdon@xxxxxxxxxx> wrote:
>
> @@ -6051,6 +6071,13 @@ static void sched_core_cpu_deactivate(unsigned int cpu)
> core_rq->core_forceidle = rq->core_forceidle;
> core_rq->core_forceidle_seq = rq->core_forceidle_seq;
>
> + /*
> + * Accounting edge for forced idle is handled in pick_next_task().
> + * Don't need another one here, since the hotplug thread shouldn't
> + * have a cookie.
> + */
> + core_rq->core_forceidle_start = 0;
> +
> /* install new leader */
> for_each_cpu(t, smt_mask) {
> rq = cpu_rq(t);

Realized there needs to be a similar edge in sched_core_flip(). I'll
include that in a v2, after seeing if there are any other comments on
this patch.