aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorFan Li <[email protected]>2016-02-03 16:21:57 +0800
committerJaegeuk Kim <[email protected]>2016-02-22 16:07:23 -0800
commit688159b6db47a9ebc0b34402bf5df157c45f6a46 (patch)
tree15268fe94343e7178133592ca5bbee49b3f3e14a /tools/perf/scripts/python
parent85ead8185a7632ca28b52f3948281ad23dec9253 (diff)
f2fs: avoid unnecessary search while finding victim in gc
variable nsearched in get_victim_by_default() indicates the number of dirty segments we already checked. There are 2 problems about the way it updates: 1. When p.ofs_unit is greater than 1, the victim we find consists of multiple segments, possibly more than 1 dirty segment. But nsearched always increases by 1. 2. If segments have been found but not been chosen, nsearched won't increase. So even we have checked all dirty segments, nsearched may still less than p.max_search. All these problems could cause unnecessary search after all dirty segments have already been checked. Signed-off-by: Fan li <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions