summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-06-10 21:44:41 +0300
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-06-20 23:37:45 +0300
commit5ccc944dce3df5fd2fd683a7df4fd49d1068eba2 (patch)
tree8c1cf8edf223d2cec883a700bc3ce8106f39beb2 /tools/perf/scripts/python
parent78ca55889a549a9a194c6ec666836329b774ab6d (diff)
downloadlinux-5ccc944dce3df5fd2fd683a7df4fd49d1068eba2.tar.xz
filemap: Correct the conditions for marking a folio as accessed
We had an off-by-one error which meant that we never marked the first page in a read as accessed. This was visible as a slowdown when re-reading a file as pages were being evicted from cache too soon. In reviewing this code, we noticed a second bug where a multi-page folio would be marked as accessed multiple times when doing reads that were less than the size of the folio. Abstract the comparison of whether two file positions are in the same folio into a new function, fixing both of these bugs. Reported-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions