Re: 3c59x vortex_timer rt hack (was: rt20 patch question)

From: Steven Rostedt
Date: Fri May 12 2006 - 11:22:06 EST



On Fri, 12 May 2006, Andrew Morton wrote:

>
> So yes, doing spin_lock_irq() (irqrestore isn't needed in a timer handler)
> instead of disable_irq() in vortex_timer() looks OK.
>
> One does wonder how long we'll hold off interrupts though.

Any longer than this!

in boomerang_start_xmit()

spin_lock_irqsave(&vp->lock, flags);

/* Wait for the stall to complete. */
issue_and_wait(dev, DownStall);

Pretty big wait!

[...]

spin_unlock_irqrestore(&vp->lock, flags);


Where we have in issue_and_wait

static void
issue_and_wait(struct net_device *dev, int cmd)
{

[...]

/* OK, that didn't work. Do it the slow way. One second */
for (i = 0; i < 100000; i++) {

[...]
}

So this can have interrupts off for over a second!

-- Steve

-
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/