aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
diff options
context:
space:
mode:
authorMitko Haralanov <[email protected]>2016-03-08 11:15:44 -0800
committerDoug Ledford <[email protected]>2016-03-21 15:55:25 -0400
commit5511d7810752f426f0a9f999100fd249d352c2ef (patch)
tree2b097aa231202242de13159ffd9a98422ff5d672 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
parenta7922f7ddf023c93b0c409d7a3557fdf0b5ce343 (diff)
IB/hfi1: Add SDMA cache eviction algorithm
This commit adds a cache eviction algorithm for the SDMA user buffer cache. Besides the interval RB tree used for node lookup, the cache nodes are also arranged in a doubly-linked list. When a node is used, it is put at the beginning of the list. Less frequently used nodes naturally move to the tail of the list. When the cache limit is reached, the eviction code starts traversing the linked list in reverse, freeing buffers until enough space has been freed to fit the new user buffer. This guarantees that only the least used cache nodes will be removed from the cache. Reviewed-by: Dennis Dalessandro <[email protected]> Reviewed-by: Dean Luick <[email protected]> Signed-off-by: Mitko Haralanov <[email protected]> Signed-off-by: Jubin John <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions