android_kernel_samsung_sm8650/kernel/sched
xieliujie 544ae28cf6 ANDROID: Inherit "user-aware property" across rtmutex.
Since upstream commit 715f7f9ece ("locking/rtmutex: Squash !RT
tasks to DEFAULT_PRIO"), non-rt tasks do not inherit the
nice-priority values across rt_mutexes. This removes the minor
(and indirect) priority-inheritance that rt-mutexes provided for
CFS tasks.

Though without priority inheritance, time-bounded priority
inversion can occur between CFS tasks of different nice
priorities / cgroup limitations.  The proxy-execution efforts
are a work-in-progress to resolve this upstream, but in the
meantime it is left to vendor hooks to provide a near term
solution to avoid priority inversion between CFS tasks.

In our oem scheduler, if a  CFS thread has an "user-aware
property", we will always pick it even if it's vruntime is
bigger than the smallest one in runqueue. That's why the
trace_android_rvh_replace_next_task_fair vendorhook was added
previously in commit 53e809978443 ("ANDROID: vendor_hooks: Add
hooks for scheduler").

Thus for our oem scheduler, important CFS tasks(like
RenderThread) are marked with the "user-aware property" in their
struct task_struct. If those tasks are blocked on an rtmutex, we
want to allow the "user-aware property" to be inherited to lock
owner, so it will be selected to run immediately to release the
lock.

To support this, we need new hooks to map "user-aware property"
into different rtmutex_waiter prio and update the owner's
"user-aware property" if needed. Thus these additional vendor
hooks are needed.

In the future, once an generalized upstream solution for CFS
priority inheritance is in place, this will no longer be needed.

Bug: 290585456
Change-Id: I6521ed2086b147400a54da6b84a324baf16bc649
Signed-off-by: xieliujie <xieliujie@oppo.com>
2023-07-27 00:04:07 +00:00
..
android.h ANDROID: kernel/sched/android.h: add uclamp_* stub functions 2022-04-02 10:47:16 +02:00
autogroup.c sched/all: Change all BUG_ON() instances in the scheduler to WARN_ON_ONCE() 2022-08-12 11:25:10 +02:00
autogroup.h sched/headers: Add header guard to kernel/sched/stats.h and kernel/sched/autogroup.h 2022-02-23 08:22:00 +01:00
build_policy.c sched: Fix missing prototype warnings 2022-05-01 10:03:43 +02:00
build_utility.c sched: Fix missing prototype warnings 2022-05-01 10:03:43 +02:00
clock.c sched/clock: Use try_cmpxchg64 in sched_clock_{local,remote} 2022-05-19 23:46:09 +02:00
completion.c sched/completion: Add wait_for_completion_state() 2022-09-07 21:53:49 +02:00
core_sched.c sched: Rename task_running() to task_on_cpu() 2022-09-07 21:53:47 +02:00
core.c ANDROID: Inherit "user-aware property" across rtmutex. 2023-07-27 00:04:07 +00:00
cpuacct.c Merge branch 'sched/fast-headers' into sched/core 2022-03-15 09:05:05 +01:00
cpudeadline.c sched/core: Introduce sched_asym_cpucap_active() 2022-08-02 12:32:45 +02:00
cpudeadline.h
cpufreq_schedutil.c ANDROID: sched: add trace_android_vh_map_util_freq parameter 2023-05-11 05:22:29 +00:00
cpufreq.c ANDROID: android: Export symbols for invoking cpufreq_update_util() 2023-05-18 20:39:10 +00:00
cpupri.c Merge 30c999937f ("Merge tag 'sched-core-2022-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") into android-mainline 2022-10-12 10:13:13 +02:00
cpupri.h sched/cpupri: Add CPUPRI_HIGHER 2020-10-29 11:00:30 +01:00
cputime.c ANDROID: vendor_hooks: Add hooks for account irqtime process tick 2023-05-19 19:41:20 +00:00
deadline.c sched: Introduce struct balance_callback to avoid CFI mismatches 2022-10-17 16:41:25 +02:00
debug.c Merge 0192445cb2 ("arch: mm: rename FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER") into android-mainline 2022-10-20 11:55:38 +02:00
fair.c UPSTREAM: sched/fair: Fixes for capacity inversion detection 2023-06-07 14:24:50 +00:00
features.h sched/fair: Introduce SIS_UTIL to search idle CPU based on sum of util_avg 2022-06-28 09:08:30 +02:00
idle.c context_tracking: Take idle eqs entrypoints over RCU 2022-07-05 13:32:16 -07:00
isolation.c sched/headers: Introduce kernel/sched/build_utility.c and build multiple .c files there 2022-02-23 10:58:33 +01:00
loadavg.c sched/headers: Introduce kernel/sched/build_utility.c and build multiple .c files there 2022-02-23 10:58:33 +01:00
Makefile ANDROID: subsystem-specific vendor_hooks.c for sched 2022-09-07 20:00:36 +00:00
membarrier.c sched/headers: Introduce kernel/sched/build_utility.c and build multiple .c files there 2022-02-23 10:58:33 +01:00
pelt.c ANDROID: sched: add vendor hook to PELT multiplier 2023-02-10 18:55:55 +00:00
pelt.h FROMLIST: sched/pelt: Introduce PELT multiplier 2023-01-05 18:15:33 +08:00
psi.c ANDROID: psi: Add vendor hooks for PSI tracing 2023-05-18 21:53:34 +00:00
rt.c ANDROID: vendor_hooks: Add hooks to record the time of the process in various states 2023-05-19 19:41:20 +00:00
sched-pelt.h
sched.h ANDROID: sched: Add oem data in struct rq 2023-06-07 14:25:06 +00:00
smp.h smp: Rename flush_smp_call_function_from_idle() 2022-05-01 10:03:43 +02:00
stats.c sched/headers: Introduce kernel/sched/build_utility.c and build multiple .c files there 2022-02-23 10:58:33 +01:00
stats.h sched/psi: Add PSI_IRQ to track IRQ/SOFTIRQ pressure 2022-09-09 11:08:32 +02:00
stop_task.c sched: Add update_current_exec_runtime helper 2022-08-27 00:05:35 +02:00
swait.c sched/headers: Introduce kernel/sched/build_utility.c and build multiple .c files there 2022-02-23 10:58:33 +01:00
topology.c ANDROID: sched: Export sched_domains_mutex for lockdep 2023-07-15 01:15:00 +00:00
vendor_hooks.c ANDROID: Inherit "user-aware property" across rtmutex. 2023-07-27 00:04:07 +00:00
wait_bit.c wait_on_bit: add an acquire memory barrier 2022-08-26 09:30:25 -07:00
wait.c Revert "Revert "wait: Return number of exclusive waiters awaken"" 2023-03-30 10:37:08 +00:00