linux-uconsole/include
Dietmar Eggemann 262fd53a10 BACKPORT: sched/uclamp: Allow to reset a task uclamp constraint value
In case the user wants to stop controlling a uclamp constraint value
for a task, use the magic value -1 in sched_util_{min,max} with the
appropriate sched_flags (SCHED_FLAG_UTIL_CLAMP_{MIN,MAX}) to indicate
the reset.

The advantage over the 'additional flag' approach (i.e. introducing
SCHED_FLAG_UTIL_CLAMP_RESET) is that no additional flag has to be
exported via uapi. This avoids the need to document how this new flag
has be used in conjunction with the existing uclamp related flags.

The following subtle issue is fixed as well. When a uclamp constraint
value is set on a !user_defined uclamp_se it is currently first reset
and then set.
Fix this by AND'ing !user_defined with !SCHED_FLAG_UTIL_CLAMP which
stands for the 'sched class change' case.
The related condition 'if (uc_se->user_defined)' moved from
__setscheduler_uclamp() into uclamp_reset().

Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Yun Hsiang <hsiang023167@gmail.com>
Link: https://lkml.kernel.org/r/20201113113454.25868-1-dietmar.eggemann@arm.com

Bug: 187772144
Change-Id: I0f77332d62f8f52b8d79b7df4904e989aeaba750
(cherry picked from commit 480a6ca2dc)
Signed-off-by: Yun Hsiang <yun.hsiang@mediatek.com>
2021-05-17 11:17:56 +08:00
..
acpi ACPI: scan: Use unique number for instance_no 2021-03-30 14:32:06 +02:00
asm-generic Merge 5.10.27 into android12-5.10 2021-04-02 15:25:50 +02:00
clocksource
crypto Merge 5.10.37 into android12-5.10 2021-05-15 09:28:55 +02:00
drm UPSTREAM: drm/drm_vblank: set the dma-fence timestamp during send_vblank_event 2021-04-07 14:20:07 +00:00
dt-bindings UPSTREAM: dt-bindings: mediatek: Add binding for mt8192 IOMMU 2021-03-24 12:45:11 -07:00
keys security: keys: trusted: fix TPM2 authorizations 2021-05-14 09:50:20 +02:00
kunit
kvm FROMGIT: KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key 2021-03-05 16:45:13 +00:00
linux ANDROID: GKI: restore termiox fields 2021-05-15 13:25:01 +02:00
math-emu
media Revert "media: v4l2-ctrls: fix reference to freed memory" 2021-05-13 14:22:12 +02:00
memory
misc
net Merge 5.10.37 into android12-5.10 2021-05-15 09:28:55 +02:00
pcmcia
ras
rdma RDMA: Lift ibdev_to_node from rds to common code 2021-02-26 10:12:59 +01:00
scsi Fix misc new gcc warnings 2021-05-11 14:47:36 +02:00
soc UPSTREAM: memory: mtk-smi: Allow building as module 2021-03-24 12:45:16 -07:00
sound FROMGIT: ASoC: soc-component: Add snd_soc_pcm_component_ack 2021-04-23 18:42:37 -07:00
target scsi: target: core: Add cmd length set before cmd complete 2021-03-17 17:06:25 +01:00
trace ANDROID: vendor_hooks: Add hooks to dup_task_struct 2021-05-13 16:47:48 +00:00
uapi BACKPORT: sched/uclamp: Allow to reset a task uclamp constraint value 2021-05-17 11:17:56 +08:00
vdso
video
xen Xen/gntdev: correct error checking in gntdev_map_grant_pages() 2021-02-23 15:53:24 +01:00
OWNERS ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-03 14:11:30 +00:00