lkml.org 
[lkml]   [2008]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] ne.c msleep not mdelay
On Sat, Aug 30, 2008 at 11:36:47PM +0900, Atsushi Nemoto wrote:
> On Sat, 30 Aug 2008 09:59:06 +0100, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> > > mdelay(10) replaced by msleep(10) to give up the CPU, it's just
> > > waiting for an interrupt, so timing isn't critical.
> >
> > It is too critical for a reschedule to occur.
> >
> > NAK this one.
>
> There are already some msleep() in probe_irq_on() which is called just
> before here. And this part is not protected by any spinlock or
> preempt_disable.

There is a probing_active mutex. probe_irq_off has the comment
"nothing prevents two IRQ probe callers from overlapping." Looks to me
like probing_active would prevent multiple probes from happening.

> So, if rescheduling was dangerous here, we already have potential
> problems, no?

I was just going to make the argument that any task that could be run
during msleep, could just as easily run on the other cpu in mdelay (if
there was one).

--
David Fries <david@fries.net>
http://fries.net/~david/ (PGP encryption key available)


\
 
 \ /
  Last update: 2008-08-30 17:01    [W:0.074 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site