Skip to content
Commit 82541e4b authored by Qais Yousef's avatar Qais Yousef
Browse files

fixup: Address review issues on gerrit



I am keeping this as a separate patch to ease reviewing.
The intention to squash with previous patch and send to gerrit.

Changes made:

- Remove uclamp_rq_inc() and instead do the call from
  enqueue_task_{fair, rt}(). This helps us to avoid the unnecessary
  uclamp_rq_inc_id() followed by uclamp_rq_dec_id() by the filter.

- Remove uclamp_min check from uclamp_can_ignore_uclamp_max()
  Many transient task in top-app group could be boosted and the check
  was overzealous. So remove it.

- Runtime info are not reliable when the task is migrating. So check for
  that in uclamp_can_ignore_uclamp_max().
  The problem is that active migration could happen after we ran for
  a brief amount of time. The runtime does not then represent the
  duration of the previous wake up.

- Change the divider to be a simple number instead of
	divider = 1 << sched_util_clamp_max_filter_divider

- Introduce a new uclamp_can_ignore_uclamp_min()
  Wei was complaining about inability to do better classification than
  what can be done on cgroup, and small tasks that don't run long enough
  could still generate requests to be boosted (as set by
  top-app->cpu.uclamp.min cgroup)

- Introduce new sysctl_sched_util_clamp_min_filter_multiplier to be used
  in conjunction with uclamp_can_ignore_uclamp_min()

- Address Lukasz review comment about potentially racing with
  update_load_avg() where it could end up calling schedutil
  cpufreq_update_util(). We add a special flag to ensure we skip this
  call from enqueue_task_fair() path. We instead do a single call after
  all necessary processing was done.

- Refactor UCLAMP_FLAG_IDLE to behave better.
  Since we now can do uclamp_rq_{inc, dec}_id() with filtering, we can
  easily end up with imbalance and the current implementation wasn't
  designed to deal with multiple callers from different call site.

  Refactor the code so that we have individual flag for UCLAMP_MIN and
  UCLAMP_MAX to tag that the current rq value is the idle value. Which
  allows us to handle the logic completely within
  uclamp_rq_{inc, dec}_id() logic without relying on the callers doing
  the right thing which was fragile anyway. as we've seen when we
  introduced uclamp_rq_reinc_id().

Signed-off-by: Qais Yousef's avatarQais Yousef <qais.yousef@arm.com>
parent 0c828b75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment