android_kernel_samsung_a7y1.../kernel
Sultan Alsawaf a1ede341b3 kernel: Add API to mark IRQs and kthreads as performance critical
On devices with a CPU that contains heterogeneous cores (e.g.,
big.LITTLE), it can be beneficial to place some performance-critical
IRQs and kthreads onto the performance CPU cluster in order to improve
performance.

This commit adds the following APIs:
-kthread_run_perf_critical() to create and start a perf-critical kthread
-irq_set_perf_affinity() to mark an active IRQ as perf-critical
-IRQF_PERF_CRITICAL to schedule an IRQ and any threads it may have onto
 performance CPUs
-PF_PERF_CRITICAL to mark a process (mainly a kthread) as performance
 critical (this is used by kthread_run_perf_critical())

In order to accommodate this new API, the following changes are made:
-Performance-critical IRQs are distributed evenly among online CPUs
 available in cpu_perf_mask
-Performance-critical IRQs have their affinities reaffined upon exit
 from suspend (since the affinities are broken when non-boot CPUs are
 disabled)
-Performance-critical IRQs and their threads have their affinities reset
 upon entering suspend, so that upon immediate suspend exit (when only
 the boot CPU is online), interrupts can be processed and interrupt
 threads can be scheduled onto an online CPU (otherwise we'd hit a
 kernel BUG)
-__set_cpus_allowed_ptr() is modified to enforce a performance-critical
 kthread's affinity
-Perf-critical IRQs are marked with IRQD_AFFINITY_MANAGED so userspace
 can't mess with their affinity

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2020-08-18 23:10:22 +05:30
..
bpf bpf: Explicitly memset the bpf_attr structure 2020-04-07 14:25:20 +02:00
configs
debug kdb: do a sanity check on the cpu in kdb_per_cpu() 2020-04-07 13:41:56 +02:00
events perf/core: Fix mlock accounting in perf_mmap() 2020-04-07 13:51:39 +02:00
gcov
irq kernel: Add API to mark IRQs and kthreads as performance critical 2020-08-18 23:10:22 +05:30
livepatch
locking locking/spinlock/debug: Fix various data races 2020-04-07 13:28:27 +02:00
power power: Add generic wakelock blocker driver v1.0.0 2020-08-18 21:54:39 +05:30
printk printk: Add sys kernel interface to configure linux printk logging 2020-04-08 11:16:47 +02:00
rcu rcutorture: Fix cleanup path for invalid torture_type strings 2020-04-06 18:20:15 +02:00
sched kernel: Add API to mark IRQs and kthreads as performance critical 2020-08-18 23:10:22 +05:30
time clocksource: Prevent double add_timer_on() for watchdog_timer 2020-04-07 13:51:37 +02:00
trace fs: prevent page refcount overflow in pipe_buf_get 2020-04-07 14:09:48 +02:00
acct.c
async.c
audit_fsnotify.c
audit_tree.c
audit_watch.c
audit.c audit: always check the netlink payload length in audit_receive_msg() 2020-04-07 14:09:50 +02:00
audit.h
auditfilter.c audit: fix error handling in audit_data_to_entry() 2020-04-07 14:04:43 +02:00
auditsc.c audit: print empty EXECVE args 2020-04-07 12:36:13 +02:00
backtracetest.c
bounds.c
capability.c
cgroup_freezer.c
cgroup_pids.c cgroup: pids: use atomic64_t for pids->limit 2020-04-07 13:07:11 +02:00
cgroup.c
compat.c
configs.c
context_tracking.c
cpu_pm.c
cpu.c kernel: Add API to mark IRQs and kthreads as performance critical 2020-08-18 23:10:22 +05:30
cpuset.c A750FNPUU4CTE3 2020-08-18 17:44:51 +05:30
crash_dump.c
cred.c access: avoid the RCU grace period for the temporary subjective credentials 2020-04-06 20:24:58 +02:00
delayacct.c
dma.c
elfcore.c kernel/elfcore.c: include proper prototypes 2020-04-07 08:08:10 +02:00
exec_domain.c
exit.c
extable.c
fork.c kernel/sysctl.c: do not override max_threads provided by userspace 2020-04-07 08:09:55 +02:00
freezer.c
futex_compat.c
futex.c futex: Unbreak futex hashing 2020-04-07 14:18:39 +02:00
groups.c
hung_task.c
irq_work.c
jump_label.c
kallsyms.c
kaslr.c
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kcov.c
kexec_core.c
kexec_file.c
kexec_internal.h
kexec.c
kmod.c
kprobes.c kprobes: Don't call BUG_ON() if there is a kprobe in use on free list 2020-04-07 12:27:35 +02:00
ksysfs.c
kthread.c
latencytop.c
Makefile printk: Add sys kernel interface to configure linux printk logging 2020-04-08 11:16:47 +02:00
membarrier.c
memremap.c
module_signing.c
module-internal.h
module.c kernel/module.c: wakeup processes in module_wq on module unload 2020-04-07 13:08:13 +02:00
notifier.c x86/mm: split vmalloc_sync_all() 2020-04-07 14:14:34 +02:00
nsproxy.c
padata.c padata: Remove broken queue flushing 2020-04-07 13:55:17 +02:00
panic.c panic: ensure preemption is disabled during panic() 2020-04-07 08:08:25 +02:00
params.c
pid_namespace.c signal/pid_namespace: Fix reboot_pid_ns to use send_sig not force_sig 2020-04-06 19:54:23 +02:00
pid.c
printk_interface.c printk: Add sys kernel interface to configure linux printk logging 2020-04-08 11:16:47 +02:00
printk_interface.h printk: Add sys kernel interface to configure linux printk logging 2020-04-08 11:16:47 +02:00
profile.c
ptrace.c ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME 2020-04-06 19:20:56 +02:00
range.c
reboot.c
relay.c
resource.c
seccomp.c
signal.c signal: avoid double atomic counter increments for user accounting 2020-04-07 14:13:36 +02:00
smp.c
smpboot.c
smpboot.h
softirq.c
stacktrace.c
stop_machine.c
sys_ni.c
sys.c kernel/sys.c: prctl: fix false positive in validate_prctl_map() 2020-04-06 19:01:43 +02:00
sysctl_binary.c
sysctl.c add toggle for disabling newly added USB devices 2020-08-18 22:05:38 +05:30
task_work.c
taskstats.c taskstats: fix data-race 2020-04-07 13:24:32 +02:00
test_kprobes.c
torture.c
tracepoint.c
tsacct.c
uid16.c
up.c
user_namespace.c
user-return-notifier.c
user.c
utsname_sysctl.c
utsname.c
watchdog.c
workqueue_internal.h
workqueue.c workqueue: Fix missing kfree(rescuer) in destroy_workqueue() 2020-04-07 13:08:09 +02:00