aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorTejun Heo <[email protected]>2011-07-12 10:46:31 +0200
committerH. Peter Anvin <[email protected]>2011-07-14 11:45:32 -0700
commitb2fea988f4f3b38ff4edfc1556a843c91932804c (patch)
tree4ab1227ab0a607ea44ba554468bda547a4d51eb5 /tools/perf/util/scripting-engines/trace-event-python.c
parentc13291a536b835b2ab278ab201f2cb1ce22f2785 (diff)
memblock: Improve generic memblock_nid_range() using for_each_mem_pfn_range()
Given an address range, memblock_nid_range() determines the node the start of the range belongs to and upto where the range stays in the same node. It's implemented by calling get_pfn_range_for_nid(), which determines min and max pfns for a given node, for each node and testing whether start address falls in there. This is not only inefficient but also incorrect when nodes interleave as min-max ranges for nodes overlap. This patch reimplements memblock_nid_range() using for_each_mem_pfn_range(). It's simpler, walks the mem ranges once and can find the exact range the start address falls in. Signed-off-by: Tejun Heo <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Cc: Yinghai Lu <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions