android_kernel_motorola_sm6375/kernel
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Pavankumar Kondeti 9db84311e7 tracing: rework sched_preempt_disable trace point implementation
The current implementation of sched_preempt_disable trace point
fails to detect the preemption disable time inside spin_lock_bh()
and spin_unlock_bh(). This is because __local_bh_disable_ip() calls
directly __preempt_count_add() which skips the preemption disable
tracking. Instead of relying on the updates to preempt count, it
is better to write the preemption disable tracking directly to
preemptsoff tracer. This is similar to how irq disable tracking
is done.

The current code handles the false positives coming from __schedule()
by directly resetting the time stamp. This requires an interface
from the scheduler to preemptsoff tracer. To avoid this additional
interface, the current patch detects the same condition by comparing
the task pid and context switch count. If they are not matching
at the time of preemption disable to enable, don't track the preemption
disable time as it involved a context switch.

Due to this rework. the sched_preempt_disable trace point location is
changed to

/sys/kernel/debug/tracing/events/preemptirq/sched_preempt_disable/enable

Change-Id: I7f58d316b7c54bc7a54102bfeb678404bda010d4
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
[satyap@codeaurora.org: port to 5.4 and resolve trivial merge conflicts]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2020-01-27 15:30:25 -08:00
..
bpf ANDROID: bpf: validate bpf_func when BPF_JIT is enabled with CFI 2019-11-27 12:49:12 -08:00
cgroup Merge android-5.4.5 (9cdc723) into msm-5.4 2020-01-23 04:00:53 -08:00
configs
debug kgdb: don't use a notifier to enter kgdb at panic; call directly 2019-09-25 17:51:40 -07:00
dma dma-mapping-fast: Clean up common code 2019-12-12 11:34:53 -08:00
events Linux 5.4-rc8 2019-11-18 08:31:11 +01:00
gcov um: Enable CONFIG_CONSTRUCTORS 2019-09-15 21:37:13 +02:00
irq genirq: Honour IRQ's affinity hint during migration 2019-12-10 12:46:22 -08:00
livepatch livepatch: Nullify obj->mod in klp_module_coming()'s error path 2019-08-19 13:03:37 +02:00
locking Revert "locking/pvqspinlock: Don't wait if vCPU is preempted" 2019-09-25 10:22:37 +02:00
power power: em: correct increasing freq/power ratio 2019-12-04 16:27:56 -08:00
printk Merge remote-tracking branch 'remotes/origin/tmp-935f8bc6f7aa' into msm-lahaina 2019-10-10 20:02:38 -07:00
rcu Merge remote-tracking branch 'remotes/origin/tmp-935f8bc6f7aa' into msm-lahaina 2019-10-10 20:02:38 -07:00
sched tracing: rework sched_preempt_disable trace point implementation 2020-01-27 15:30:25 -08:00
time Merge android-5.4.5 (9cdc723) into msm-5.4 2020-01-23 04:00:53 -08:00
trace tracing: rework sched_preempt_disable trace point implementation 2020-01-27 15:30:25 -08:00
.gitignore
acct.c
async.c
audit.c
audit.h
audit_fsnotify.c
audit_tree.c
audit_watch.c audit_get_nd(): don't unlock parent too early 2019-11-10 11:56:55 -05:00
auditfilter.c
auditsc.c
backtracetest.c
bounds.c
capability.c
cfi.c ANDROID: add support for Clang's Control Flow Integrity (CFI) 2019-11-27 12:49:12 -08:00
compat.c
configs.c kernel/configs: Replace GPL boilerplate code with SPDX identifier 2019-07-30 18:34:15 +02:00
context_tracking.c
cpu.c kernel: Add snapshot of changes to support cpu isolation 2019-12-10 12:42:32 -08:00
cpu_pm.c
crash_core.c
crash_dump.c
cred.c Merge branch 'access-creds' 2019-07-25 08:36:29 -07:00
delayacct.c
dma.c
elfcore.c kernel/elfcore.c: include proper prototypes 2019-09-25 17:51:39 -07:00
exec_domain.c
exit.c Merge android-5.4.5 (9cdc723) into msm-5.4 2020-01-23 04:00:53 -08:00
extable.c extable: Add function to search only kernel exception table 2019-08-21 22:23:48 +10:00
fail_function.c
fork.c Merge android-5.4.5 (9cdc723) into msm-5.4 2020-01-23 04:00:53 -08:00
freezer.c Revert "libata, freezer: avoid block device removal while system is frozen" 2019-10-06 09:11:37 -06:00
futex.c futex: Prevent exit livelock 2019-11-29 10:10:14 +01:00
gen_kheaders.sh kheaders: substituting --sort in archive creation 2019-10-17 09:08:19 +09:00
groups.c
hung_task.c
iomem.c
irq_work.c
jump_label.c jump_label: Don't warn on __exit jump entries 2019-08-29 15:10:10 +01:00
kallsyms.c kallsyms: Don't let kallsyms_lookup_size_offset() fail on retrieving the first symbol 2019-08-27 16:19:56 +01:00
kcmp.c
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt sched/rt, Kconfig: Unbreak def/oldconfig with CONFIG_PREEMPT=y 2019-07-22 18:05:11 +02:00
kcov.c
kexec.c kexec_load: Disable at runtime if the kernel is locked down 2019-08-19 21:54:15 -07:00
kexec_core.c kexec: bail out upon SIGKILL when allocating memory. 2019-09-25 17:51:40 -07:00
kexec_elf.c kexec_elf: support 32 bit ELF files 2019-09-06 23:58:44 +02:00
kexec_file.c Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
kexec_internal.h
kheaders.c
kmod.c
kprobes.c Tracing updates: 2019-09-20 11:19:48 -07:00
ksysfs.c
kthread.c kthread: make __kthread_queue_delayed_work static 2019-10-16 09:20:58 -07:00
latencytop.c
Makefile ANDROID: add support for Clang's Control Flow Integrity (CFI) 2019-11-27 12:49:12 -08:00
module-internal.h
module.c ANDROID: add support for Clang's Control Flow Integrity (CFI) 2019-11-27 12:49:12 -08:00
module_signature.c MODSIGN: Export module signature definitions 2019-08-05 18:39:56 -04:00
module_signing.c MODSIGN: Export module signature definitions 2019-08-05 18:39:56 -04:00
notifier.c
nsproxy.c
padata.c padata: remove cpu_index from the parallel_queue 2019-09-13 21:15:41 +10:00
panic.c panic: ensure preemption is disabled during panic() 2019-10-07 15:47:19 -07:00
params.c lockdown: Lock down module params that specify hardware parameters (eg. ioport) 2019-08-19 21:54:16 -07:00
pid.c kernel/pid.c: convert struct pid count to refcount_t 2019-07-16 19:23:24 -07:00
pid_namespace.c proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
profile.c
ptrace.c ptrace: add PTRACE_GET_SYSCALL_INFO request 2019-07-16 19:23:24 -07:00
range.c
reboot.c FROMLIST: reboot: Export reboot_mode 2019-11-25 11:46:31 -08:00
relay.c
resource.c mm/memory_hotplug.c: use PFN_UP / PFN_DOWN in walk_system_ram_range() 2019-09-24 15:54:09 -07:00
rseq.c
scs.c FROMLIST: scs: add support for stack usage debugging 2019-11-27 12:49:09 -08:00
seccomp.c
signal.c Merge "mm: oom_kill: reap memory of a task that receives SIGKILL" 2019-12-17 16:36:52 -08:00
smp.c kernel: Add snapshot of changes to support cpu isolation 2019-12-10 12:42:32 -08:00
smpboot.c
smpboot.h
softirq.c Revert "softirq: Let ksoftirqd do its job" 2019-12-10 12:46:30 -08:00
stackleak.c
stacktrace.c stacktrace: Don't skip first entry on noncurrent tasks 2019-11-04 21:19:25 +01:00
stop_machine.c stop_machine: Avoid potential race behaviour 2019-10-17 12:47:12 +02:00
sys.c Merge Linus's 5.4-rc1-prerelease branch into android-mainline 2019-09-20 16:07:54 -07:00
sys_ni.c
sysctl.c tracing: rework sched_preempt_disable trace point implementation 2020-01-27 15:30:25 -08:00
sysctl_binary.c
task_work.c
taskstats.c
test_kprobes.c
torture.c torture: Remove exporting of internal functions 2019-08-01 14:30:22 -07:00
tracepoint.c The main changes in this release include: 2019-07-18 11:51:00 -07:00
tsacct.c
ucount.c proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
uid16.c
uid16.h
umh.c
up.c
user-return-notifier.c
user.c Linus 5.3-rc1 2019-07-23 16:21:59 -07:00
user_namespace.c
utsname.c
utsname_sysctl.c
watchdog.c watchdog: use per_cpu_ptr() in watchdog_disable() 2019-12-10 12:46:40 -08:00
watchdog_hld.c
workqueue.c Merge android-5.4.5 (9cdc723) into msm-5.4 2020-01-23 04:00:53 -08:00
workqueue_internal.h