aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nssearch.c
diff options
context:
space:
mode:
authorAlexey Starikovskiy <astarikovskiy@suse.de>2010-05-25 23:53:07 -0400
committerLen Brown <len.brown@intel.com>2010-07-06 22:33:56 -0400
commitc45b5c097001480e66d4c523eb715ad317a4ef77 (patch)
tree5b9415840b97a724537273db99b2c66975c63347 /drivers/acpi/acpica/nssearch.c
parent5821f75421aa7c7bafdec291223153597f649934 (diff)
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,
152 return_ACPI_STATUS(AE_OK); 152 return_ACPI_STATUS(AE_OK);
153 } 153 }
154 154
155 /*
156 * The last entry in the list points back to the parent,
157 * so a flag is used to indicate the end-of-list
158 */
159 if (node->flags & ANOBJ_END_OF_PEER_LIST) {
160
161 /* Searched entire list, we are done */
162
163 break;
164 }
165
166 /* Didn't match name, move on to the next peer object */ 155 /* Didn't match name, move on to the next peer object */
167 156
168 node = node->peer; 157 node = node->peer;
@@ -217,7 +206,7 @@ acpi_ns_search_parent_tree(u32 target_name,
217 206
218 ACPI_FUNCTION_TRACE(ns_search_parent_tree); 207 ACPI_FUNCTION_TRACE(ns_search_parent_tree);
219 208
220 parent_node = acpi_ns_get_parent_node(node); 209 parent_node = node->parent;
221 210
222 /* 211 /*
223 * If there is no parent (i.e., we are at the root) or type is "local", 212 * 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,
261 250
262 /* Not found here, go up another level (until we reach the root) */ 251 /* Not found here, go up another level (until we reach the root) */
263 252
264 parent_node = acpi_ns_get_parent_node(parent_node); 253 parent_node = parent_node->parent;
265 } 254 }
266 255
267 /* Not found in parent tree */ 256 /* Not found in parent tree */