Re: [patch] entry.S calling schedule() with interrupts disabled, 2.2.2

Linus Torvalds (torvalds@transmeta.com)
Mon, 1 Mar 1999 10:45:48 -0800 (PST)


On Mon, 1 Mar 1999, Alan Cox wrote:
>
> Look harder, lots of drivers and net stuff does. Its a standard scheme to
> avoid races

(example deleted)

Note that if you really want to, you _can_ rewrite the sequences to use
the wait queues, which has several advantages, not the least of which is
that you suddenly no longer need to get the gloabl interrupt lock any
more.

We've already done that for most of the critical stuff, but there's a lot
of random non-critical stuff that takes the simple approach. Which does
make sense.

However, most of them probably do use "sleep_on()", so it's probably
acceptable to just make the sleep_on() changes you did, and then for
anything that calls "schedule()" directly you make sure that interrupts
are on. That would probably work fine, and you probably wouldn't find all
that many places that needed to be fixed up.

Linus

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