Re: [patch] Voluntary Preempt additions

From: Ingo Molnar
Date: Mon Oct 18 2004 - 13:45:48 EST



* Robert Love <rml@xxxxxxxxxx> wrote:

> On Mon, 2004-10-18 at 10:49 -0700, Daniel Walker wrote:
>
> > - Modified latency tracer to trace non-preemptable mutex locking , in
> > /proc/lock_trace
>
> Why?
>
> It is a bug to have preemption disabled when entering non-atomic
> (schedulable) code, and a stack trace is dumped if that happens.
>
> Isn't that sufficient?

also, i improved that stackdump in the U4/U5 patches (PREEMPT_TRACE) to
include a trace of critical sections held at that moment:

[<c0169dcb>] sys_unlink+0xdc/0x129
[<c01060b5>] sysenter_past_esp+0x52/0x71
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: free_hot_cold_page+0x82/0x149 / (__pagevec_free+0x1f/0x28)
.. entry 2: print_traces+0x1b/0x54 / (dump_stack+0x23/0x25)

While the stackdump indeed is supposed to clearly identify the critical
section, they can be quite large and opaque, sometimes they even lose
the information of where the lock was acquired, and in practice it's
much easier to use PREEMPT_TRACE.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/