: latency histogram patch cleanup
PATCH 1/1 : latency histogram patch cleanup
Hi, Ingo
According to your suggestion, I check your cleanup and correct some errors and modify latency type decision.
This patch corrects some latency histogram configration options name, adds a field to cpu_trace struct, removes that ugly latenct type decision statement
block, adds a latency_type parameter to __start_critical_timing.
diffstat:
kernel/latency.c | 51 +++++++++++++++------------------------------------ lib/Kconfig.debug | 4 ++-- 2 files changed, 17 insertions(+), 38 deletions(-)
lib/Kconfig.debug renamed from lib/Kconfig.debug.orig +2 -2
@@ -180,7 +180,7 @@ config CRITICAL_PREEMPT_TIMING enabled. This option and the irqs-off timing option can be used together or separately.) -config PREEMPT_OFF_LOG +config PREEMPT_OFF_HIST bool "non-preemptible critical section latency histogram" default n depends on CRITICAL_PREEMPT_TIMING
@@ -244,7 +244,7 @@ config LATENCY_TIMING config CRITICAL_LATENCY_HIST bool default y - depends on PREEMPT_OFF_LOG || INTERRUPT_OFF_LOG + depends on PREEMPT_OFF_HIST || INTERRUPT_OFF_HIST config LATENCY_HIST bool
kernel/latency.c renamed from kernel/latency.c.orig +15 -36
143 lines not on this page · raw message
Comments below ...
kernel/latency.c check_critical_timing(int cpu, struct cp · line 1369
Quoted 4 lines · yangyi
kernel/latency.c renamed from kernel/latency.c.orig +2
-0+#ifndef CONFIG_CRITICAL_LATENCY_HIST if (!report_latency (delta)) goto out; +#endif
Why ? This combined with the hunk below is just preempt_threshold .. Just use preempt_threshold instead of all the ifdefs everywhere .
Quoted 16 lines
kernel/latency.c renamed from kernel/latency.c.orig +2
-0____trace (cpu,TRACE_FN , tr,CALLER_ADDR0 , parent_eip,0 ,0 ,0 );/* @@ -1393,11 +1382,13 @@ check_critical_timing(int cpu, struct cpif (tr->critical_sequence != max_sequence ||down_trylock (&max_mutex)) goto out; +#ifndef CONFIG_CRITICAL_LATENCY_HIST if (!preempt_thresh && preempt_max_latency > delta) {printk ("bug: updating %016Lx > %016Lx?\n" , preempt_max_latency, delta);printk (" [%016Lx %016Lx %016Lx]\n" ,T0 ,T1 ,T2 ); } +#endif latency =cycles_to_usecs (delta);
Quoted 9 lines · yangyi
Hi, Ingo
According to your suggestion, I check your cleanup and correct some errors and modify latency type decision.
This patch corrects some latency histogram configration options name, adds a field to
cpu_tracestruct, removes that ugly latenct type decision statement block, adds alatency_typeparameter to__start_critical_timing.
thanks - i've applied your changes and have released the -53-02 patch.
Ingo