diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-05 15:21:20 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2024-01-08 13:49:42 +0100 |
commit | 09c72028392cf5e12532411c0a0caa72d886b6b6 (patch) | |
tree | 2800ed233a295a926e6fc36c28cf524473714079 /kernel | |
parent | 02f5ea298cc80b6785f5bc04bb0fbf3d53a616a9 (diff) |
kernel/latencytop: Add non-scheduler interface for latency reporting
Some sources of significant amounts of latency aren't simple sleeps
but instead busy-loops or a series of hundreds of small sleeps simply
because the hardware can't do better. Unfortunately latencytop doesn't
register these and so they slip under the radar. Hence expose a
simplified interface to report additional latencies and export the
underlying function so that modules can use this.
The example I have in mind are edid reads. The drm subsystem exposes
both interfaces to do full probes and to just get at the cached state
from the last probe and often userspace developers don't know about
the difference and incur unecessary big latencies. And usually the i2c
transfer is done with busy-looping or if there is a hw engine it might
only be able to transfer a few bytes per sleep/irq cycle. And edid
reads take at least 12ms and with crappy hw can easily be a few
hundred ms.
v2: Simplify #ifdefs a bit (Chris).
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/latencytop.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/latencytop.c b/kernel/latencytop.c index 781249098cb6..04cc0dff6550 100644 --- a/kernel/latencytop.c +++ b/kernel/latencytop.c @@ -63,6 +63,7 @@ static DEFINE_RAW_SPINLOCK(latency_lock); static struct latency_record latency_record[MAXLR]; int latencytop_enabled; +EXPORT_SYMBOL_GPL(latencytop_enabled); #ifdef CONFIG_SYSCTL static int sysctl_latencytop(struct ctl_table *table, int write, void *buffer, @@ -239,6 +240,7 @@ __account_scheduler_latency(struct task_struct *tsk, int usecs, int inter) out_unlock: raw_spin_unlock_irqrestore(&latency_lock, flags); } +EXPORT_SYMBOL_GPL(__account_scheduler_latency); static int lstats_show(struct seq_file *m, void *v) { |