Bug 5121 - object tracking in debug too slow
Summary: object tracking in debug too slow
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: ACPI
Classification: Unclassified
Component: ACPICA-Core (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Alexey Starikovskiy
URL:
Keywords:
: 4393 5008 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-24 03:07 UTC by Andi Kleen
Modified: 2006-09-28 13:21 UTC (History)
3 users (show)

See Also:
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. (581 bytes, patch)
2005-08-24 03:10 UTC, Andi Kleen
Details | Diff
Patch to disable memory tracking while under DEBUG_OUTPUT (456 bytes, patch)
2005-08-24 22:09 UTC, Alexey Starikovskiy
Details | Diff

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. ***

Note You need to log in before you can comment on or make changes to this bug.