diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2010-05-25 23:53:07 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-07-06 22:33:56 -0400 |
commit | c45b5c097001480e66d4c523eb715ad317a4ef77 (patch) | |
tree | 5b9415840b97a724537273db99b2c66975c63347 /drivers/acpi/acpica/nsaccess.c | |
parent | 5821f75421aa7c7bafdec291223153597f649934 (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/nsaccess.c')
-rw-r--r-- | drivers/acpi/acpica/nsaccess.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c index 2cebfa94b79a..0cd925be5fc1 100644 --- a/drivers/acpi/acpica/nsaccess.c +++ b/drivers/acpi/acpica/nsaccess.c | |||
@@ -338,8 +338,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
338 | */ | 338 | */ |
339 | while (!acpi_ns_opens_scope(prefix_node->type) && | 339 | while (!acpi_ns_opens_scope(prefix_node->type) && |
340 | prefix_node->type != ACPI_TYPE_ANY) { | 340 | prefix_node->type != ACPI_TYPE_ANY) { |
341 | prefix_node = | 341 | prefix_node = prefix_node->parent; |
342 | acpi_ns_get_parent_node(prefix_node); | ||
343 | } | 342 | } |
344 | } | 343 | } |
345 | } | 344 | } |
@@ -419,7 +418,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
419 | /* Backup to the parent node */ | 418 | /* Backup to the parent node */ |
420 | 419 | ||
421 | num_carats++; | 420 | num_carats++; |
422 | this_node = acpi_ns_get_parent_node(this_node); | 421 | this_node = this_node->parent; |
423 | if (!this_node) { | 422 | if (!this_node) { |
424 | 423 | ||
425 | /* Current scope has no parent scope */ | 424 | /* Current scope has no parent scope */ |