From: Pavel M. <pa...@su...> - 2002-05-01 20:23:21
|
Hi! > > > is different from a process that simply doesn't get > > scheduled? Right now I > > > don't see any reason why userland code would be scheduled > > at all, once the > > > suspend process is started. If that's the case, then we > > don't need to worry > > > about the problem you are fixing. > > > > Unfortunately, that's not the case. Drivers may sleep while preparing > > to suspend, and kernel will happily schedule some other task at that > > point. > > I'll begin by freely admitting that I don't know how the scheduling works, > but then say that sometimes the ignorant can come up with solutions that the > knowledgable didn't see. Here's hoping I'm about to do that :> > I'm wondering if it would be possible to somehow temporarily move the > processes out of the list that the kernel uses to decide what to schedule, > so that it doesn't 'happily schedule some other task at that point' because > it doesn't see that anything needs scheduling. There lays a way for deadlocks. Imagine one of user processes holds important_lock_A, and some random driver needs important_lock_A for its suspend. Boom. Pavel -- Casualities in World Trade Center: ~3k dead inside the building, cryptography in U.S.A. and free speech in Czech Republic. |