Re: [PATCH] Instrumenting high latency

From: Arjan van de Ven
Date: Mon Jul 12 2004 - 03:31:47 EST


On Mon, 2004-07-12 at 09:34, Andrew Morton wrote:
> Con Kolivas <kernel@xxxxxxxxxxx> wrote:
> >
> > He hacked
> > together this simple patch which times periods according to the preempt
> > count.
>
> OK, small problem. We have code which does, effectively,
>
> if (need_resched()) {
> drop_the_lock();
> schedule();
> grab_the_lock();
> }
>
> so if need_resched() stays false then this will hold the lock for a long
> time and bogus reports are generated:

... or reset the time(r) in need_resched() under the assumption that all
need_resched() callers will yield when it returns true...

Attachment: signature.asc
Description: This is a digitally signed message part