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/nsnames.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/nsnames.c')
-rw-r--r-- | drivers/acpi/acpica/nsnames.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/nsnames.c b/drivers/acpi/acpica/nsnames.c index 7dea0031605c..d3104af57e13 100644 --- a/drivers/acpi/acpica/nsnames.c +++ b/drivers/acpi/acpica/nsnames.c | |||
@@ -93,7 +93,7 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node, | |||
93 | /* Put the name into the buffer */ | 93 | /* Put the name into the buffer */ |
94 | 94 | ||
95 | ACPI_MOVE_32_TO_32((name_buffer + index), &parent_node->name); | 95 | ACPI_MOVE_32_TO_32((name_buffer + index), &parent_node->name); |
96 | parent_node = acpi_ns_get_parent_node(parent_node); | 96 | parent_node = parent_node->parent; |
97 | 97 | ||
98 | /* Prefix name with the path separator */ | 98 | /* Prefix name with the path separator */ |
99 | 99 | ||
@@ -198,7 +198,7 @@ acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node) | |||
198 | return 0; | 198 | return 0; |
199 | } | 199 | } |
200 | size += ACPI_PATH_SEGMENT_LENGTH; | 200 | size += ACPI_PATH_SEGMENT_LENGTH; |
201 | next_node = acpi_ns_get_parent_node(next_node); | 201 | next_node = next_node->parent; |
202 | } | 202 | } |
203 | 203 | ||
204 | if (!size) { | 204 | if (!size) { |