One some machines when ACPI_DEBUG is enabled kacpid can take 80-90%
of CPU time. Some profiling shows that a lot of the time is spent
just walking a list of objects in memory allocation debugging
(the other seems to be spent in EC accesses)
Every time an object is used the complete list of all objects
is walked, which is extremly slow.
Created attachment 5744 [details]
This patch disables the slow search and recovers most of the CPU time.
I suspect the object search is not very useful for debugging anyways
so I just disabled it. If it was deemed useful some other data structure
(tree, hash) would be needed to make this more efficient, otherwise
ACPI_DEBUG is unusable on these machines.
Created attachment 5756 [details]
Patch to disable memory tracking while under DEBUG_OUTPUT
0408 ACPICA version disables internal object cache by default, so code becomes
slightly faster and smaller, but number of allocations to track significantly
increases. This patch does the same as patch suggested by Andy, but it stops
memory allocation tracking at the source, rather than in the middle. On the
bright side, 0729 ACPICA version starts to use linux slab allocator, so the
number of generic allocations goes down again and this patch is needed only for
a period before 0729 will be propogated.
*** Bug 4393 has been marked as a duplicate of this bug. ***
Ok thanks Alexey. That should work great too.
ACPICA 20050902 shipped in 2.6.13-git9.
*** Bug 5008 has been marked as a duplicate of this bug. ***