Re: [lm-sensors] Could the k8temp driver be interfering with ACPI?

Pavel Machek
2007-03-07T09:36:56Z

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