Re: More PCI races...

From: David Hinds (
Date: Mon Jun 19 2000 - 12:36:47 EST

On Fri, Jun 16, 2000 at 05:45:33PM -0700, George Anzinger wrote:

> > That's not right at all. The scheduler certainly checks for bottom
> > half stuff, just like it checks for expired timers. However, neither
> > timers nor bottom halves run in process context. Neither may sleep.

> Guess it depends on what you mean by process context. What I was saying
> is that they don't run in interrupt context, i.e. they are called from
> schedule.

The fact that they are called from schedule() is not diagnostic. They
are not running in process context. "interrupt context" is perhaps
misleading: call it the "you can't schedule because there is no active
process" context if you like.

> They do run on the current tasks stack and they are called by
> the scheduler with the interrupt system on. If they were to sleep, I
> expect that the current process would be the one to sleep.

No, you are simply wrong. Try it.

> Granted this
> is a _BIG NO-NO_, but I don't think there is a check in place to stop
> it. So, how do we define process context or interrupt context?

See the definition of in_interrupt(). Note that it checks to see if
either a real interrupt handler or a bottom half is running on this
CPU. Notice that schedule() panics if in_interrupt() is true.

-- Dave

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:17 EST