aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/nssearch.c
diff options
context:
space:
mode:
authorGravatar Alexey Starikovskiy <astarikovskiy@suse.de> 2010-05-26 11:53:07 +0800
committerGravatar Len Brown <len.brown@intel.com> 2010-07-06 22:33:56 -0400
commitc45b5c097001480e66d4c523eb715ad317a4ef77 (patch)
tree5b9415840b97a724537273db99b2c66975c63347 /drivers/acpi/acpica/nssearch.c
parentACPICA: Expand device initialization counters to 32 bits (diff)
downloadlinux-c45b5c097001480e66d4c523eb715ad317a4ef77.tar.gz
linux-c45b5c097001480e66d4c523eb715ad317a4ef77.tar.bz2
linux-c45b5c097001480e66d4c523eb715ad317a4ef77.zip
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 <astarikovskiy@suse.de> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nssearch.c')
-rw-r--r--drivers/acpi/acpica/nssearch.c15
1 files changed, 2 insertions, 13 deletions
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 */