Bug 5121

Summary: object tracking in debug too slow
Product: ACPI Reporter: Andi Kleen (andi-bz)
Component: ACPICA-CoreAssignee: Alexey Starikovskiy (astarikovskiy)
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: acpi-bugzilla, sanjoy, vsu
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.13-rc6 Subsystem:
Regression: --- Bisected commit-id:
Attachments: This patch disables the slow search and recovers most of the CPU time.
Patch to disable memory tracking while under DEBUG_OUTPUT

Description Andi Kleen 2005-08-24 03:07:51 UTC
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.
Comment 1 Andi Kleen 2005-08-24 03:10:11 UTC
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.
Comment 2 Alexey Starikovskiy 2005-08-24 22:09:11 UTC
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.
Comment 3 Alexey Starikovskiy 2005-08-24 22:11:59 UTC
*** Bug 4393 has been marked as a duplicate of this bug. ***
Comment 4 Andi Kleen 2005-08-25 03:16:38 UTC
Ok thanks Alexey. That should work great too. 
 
Comment 5 Len Brown 2005-09-09 09:18:03 UTC
ACPICA 20050902 shipped in 2.6.13-git9.
Closing.
Comment 6 Luming Yu 2005-09-15 01:33:43 UTC
*** Bug 5008 has been marked as a duplicate of this bug. ***