From c45b5c097001480e66d4c523eb715ad317a4ef77 Mon Sep 17 00:00:00 2001 From: Alexey Starikovskiy Date: Wed, 26 May 2010 11:53:07 +0800 Subject: ACPICA: Performance enhancement for namespace search and access This change enhances the performance of namespace searches and walks by adding a backpointer to the parent in each namespace node. On large namespaces, this change can improve overall ACPI performance by up to 9X. Adding a pointer to each namespace node increases the overall size of the internal namespace by about 5%, since each namespace entry usually consists of both a namespace node and an ACPI operand object. Signed-off-by: Alexey Starikovskiy Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- drivers/acpi/acpica/nssearch.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'drivers/acpi/acpica/nssearch.c') diff --git a/drivers/acpi/acpica/nssearch.c b/drivers/acpi/acpica/nssearch.c index a8e42b5e9463..41102a84272f 100644 --- a/drivers/acpi/acpica/nssearch.c +++ b/drivers/acpi/acpica/nssearch.c @@ -152,17 +152,6 @@ acpi_ns_search_one_scope(u32 target_name, return_ACPI_STATUS(AE_OK); } - /* - * The last entry in the list points back to the parent, - * so a flag is used to indicate the end-of-list - */ - if (node->flags & ANOBJ_END_OF_PEER_LIST) { - - /* Searched entire list, we are done */ - - break; - } - /* Didn't match name, move on to the next peer object */ node = node->peer; @@ -217,7 +206,7 @@ acpi_ns_search_parent_tree(u32 target_name, ACPI_FUNCTION_TRACE(ns_search_parent_tree); - parent_node = acpi_ns_get_parent_node(node); + parent_node = node->parent; /* * If there is no parent (i.e., we are at the root) or type is "local", @@ -261,7 +250,7 @@ acpi_ns_search_parent_tree(u32 target_name, /* Not found here, go up another level (until we reach the root) */ - parent_node = acpi_ns_get_parent_node(parent_node); + parent_node = parent_node->parent; } /* Not found in parent tree */ -- cgit v1.2.3