Re: More PCI races...

From: George Anzinger (george@pioneer.net)
Date: Fri Jun 16 2000 - 19:45:33 EST


David Hinds wrote:
>
> On Fri, Jun 16, 2000 at 01:57:40PM -0700, George Anzinger wrote:
> > Well, maybe some do, but the scheduler checks for bottom half stuff each
> > time thru, thus there at least is the expectation that some of them run
> > outside of interrupt context. They do, however, always run before any
> > other task that the scheduler might want to switch to.
>
> 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.
>
> -- Dave
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. 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. 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? Can you
tell by looking at the stack? On some systems interrupts are handled on
a seperate stack, but not on linux. I suppose you could say that you
are in interrupt context if somewhere on the stack you find an interrupt
save frame, or alternatively that in the normal course of returning from
called functions one will eventually rti. In linux, I think the line
between the two states is a bit murky, still we do want to keep bottom
half stuff from "waiting" for anything.

George

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



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