Hi!

> > > > 2) make ACPI take this lock whenever it touches ports not allocated by 
> > > > itself
> > > >    and release it on function return.
> > > 
> > > This is costly.
> > 
> > TANSTAAFL. You'll need to take some lock, and if you want port emulation 
> > or per-device-mutex, you'll have to pay the price.
> 
> True, but precisely, I wonder what will perform the best in practice, a
> single semaphore that is unconditionally taken by ACPI/AML, or your
> finer-grained approach and its many additional tests.

I'd say mutexes are not that bad. ... i/o accesses are expensive,
anyway, right?

> We may be able to workaround the inter-driver exclusion though, if we
> use a semaphore initialized to N, have ACPI take N, but other drivers
> take just one. This would let ACPI be exclusive with all the other
> drivers, but drivers themselves could otherwise run concurrently. That
> being said, we do not appear to have the required primitives to take
> more than 1 semaphore resource at once at the moment, so we'd need to
> do that first.

Hmm, nice hack. Yes, driver-driver serialization would be nasty.
                                                                        Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to