[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMDSEHB5+zlajb4x@google.com>
Date: Wed, 9 Jun 2021 14:37:04 +0000
From: Quentin Perret <qperret@...gle.com>
To: mingo@...hat.com, peterz@...radead.org, vincent.guittot@...aro.org,
dietmar.eggemann@....com, qais.yousef@....com, rickyiu@...gle.com,
wvw@...gle.com, patrick.bellasi@...bug.net
Cc: linux-kernel@...r.kernel.org, kernel-team@...roid.com
Subject: Re: [PATCH] sched: Fix UCLAMP_FLAG_IDLE setting
On Wednesday 09 Jun 2021 at 14:33:39 (+0000), Quentin Perret wrote:
> The UCLAMP_FLAG_IDLE flag is set on a runqueue when dequeueing the last
> active task to maintain the last uclamp.max and prevent blocked util
> from suddenly becoming visible.
>
> However, there is an asymmetry in how the flag is set and cleared which
> can lead to having the flag set whilst there are active task on the rq.
> Specifically, the flag is set in the uclamp_rq_inc() path, which is
> called at enqueue time, but cleared in the uclamp_rq_dec_id() which is
> called both when dequeueing and task _and_ during cgroup migrations.
>
> Fix this by setting the flag in the uclamp_rq_inc_id() path to ensure
> things remain symmetrical.
>
> Reported-by: Rick Yiu <rickyiu@...gle.com>
> Signed-off-by: Quentin Perret <qperret@...gle.com>
Argh, and I think this wants
Fixes: e496187da710 ("sched/uclamp: Enforce last task's UCLAMP_MAX")
Powered by blists - more mailing lists