aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorJan Kara <[email protected]>2024-06-25 12:18:57 +0200
committerAndrew Morton <[email protected]>2024-07-03 19:30:27 -0700
commit0b1efc3e78d12278a8c0f2c665d66564a2cb965f (patch)
treeff4cb81950e837b23618c822947ffc206b99e837 /tools/perf/scripts/python/net_dropmonitor.py
parent8eaf93ac70f3e1bbbe7e28a4f34289ef2d0d0bef (diff)
readahead: drop dead code in ondemand_readahead()
ondemand_readahead() scales up the readahead window if the current read would hit the readahead mark placed by itself. However the condition is mostly dead code because: a) In case of async readahead we always increase ra->start so ra->start == index is never true. b) In case of sync readahead we either go through try_context_readahead() in which case ra->async_size == 1 < ra->size or we go through initial_readahead where ra->async_size == ra->size iff ra->size == max_pages. So the only practical effect is reducing async_size for large initial reads. Make the code more obvious. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Jan Kara <[email protected]> Reviewed-by: Josef Bacik <[email protected]> Tested-by: Zhang Peng <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions