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



Hi David,

On Mon, 5 Mar 2007 13:35:20 -0800, David Hubbard wrote:
2* It seems to incur a signficant performance penalty.
____request_resource isn't cheap as far as I know. And in the
absence of conflict, you are even allocating and releasing the resource
on _each_ I/O operation, which certainly isn't cheap either. Again, it
is not a blocker point, after all this is a workaround for an improper
behavior of the acpi subsystem, this performance penalty is the price to
pay. But there is also a performance penalty for legitimate I/O access,
which worries me more.

I thought Rudolf's patch allocated the resource in the driver
(w83627ehf) and ACPI contacted the driver when it could not allocate
the resource. Since ACPI never *really* wants to allocate the
resource, is there a fast-path check it could do? This would help
performance.

Alas, I don't think it can work safely. If ACPI doesn't actually
allocate the resource, there is a risk that another driver does so
between the conflict check and the I/O access. I believe this is the
reason why Rudolf used ____request_resource and not __check_region.

I like the virtualized driver method (if it wasn't obvious!) but the
global AML lock works also. It will be interesting to see profiling of
both solutions.

In fact Rudolf's solution is nice for LPC chips, however I don't think
it can work with SMBus chips. It might intercept the accesses to the
SMBus master and be able to emulate it, even though this will be more
complex that the W83627EHF case, and I'm not sure about the PCI config
space. But ultimately we need to emulate all the chips behind the
SMBus, too. The drivers for these chips won't know if they are accessed
for real of through the emulation layer, so there is no way they'll
remember states, while they might have to (e.g. the W83781D has a bank
register too.)

The AML lock approach, OTOH, should work fine in all cases as long as
the context doesn't need to be remembered across AML "sections".

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



Relevant Pages

  • Re: Work scedule for individual workers? MS Project 2007
    ... I have a construction project and I would like to allocate ... I have 3 x labourers, Bill, Ed, and Will. ... 100% to indicate multiple of a skill set or resource. ... named workers under a skillset and ask MS Project to allocate them ...
    (microsoft.public.project)
  • Re: NdisQueryBufferSafe question
    ... Yes it is normal to have a chained buffer of length zero. ... If the call fails, the worst that can happen is ... failure to allocate resources could be far more devastating. ... Don't bother with queuing because that could make the low resource situation ...
    (microsoft.public.development.device.drivers)
  • Re: HPET regression in 2.6.26 versus 2.6.25 -- connection between HPET and lockups found
    ... Does this connection between HPET and insert_resourcelook ... perhaps we stomp over some piece of memory that is "available RAM" ... this will allocate the hpet resource descriptor in lower RAM. ...
    (Linux-Kernel)
  • [PATCH 11/19] TuxOnIce: Block I/O engine.
    ... I/O to that storage. ... used for reading the signature. ... If we were writing the page, we want to free it and will have ... * textbook - allocate and initialize the bio. ...
    (Linux-Kernel)
  • Re: Explain this about threads
    ... I've created a thread how can I "block" while I wait for a resource to come availiable? ... Sleepis also a blocking method. ... Again, these are synchronization mechanisms, but this time rather than having one thread explicitly waiting and another explicitly signaling, they are ways of having both threads indicate to the OS "hey, I want this resource" and then allowing the OS to do the hard work of ensuring that only one thread is runnable at a time while they are using that resource. ... Pretty much any form of i/o you can do involves at some level a call to a low-level OS function that uses some internal signaling method to allow the OS to make your thread unrunnable until the i/o completes. ...
    (microsoft.public.dotnet.languages.csharp)