Re: [PATCH 18/25] btrfs: Use readahead_batch_length

2020-12-17 Thread John Hubbard
On 12/17/20 5:42 AM, Matthew Wilcox wrote: On Thu, Dec 17, 2020 at 12:12:46PM +, Matthew Wilcox wrote: ehh ... probably an off-by-one. Does subtracting 1 from contig_end fix it? I'll spool up a test VM shortly and try it out. Yes, this fixed it: - u64 contig_end = contig_st

Re: [PATCH 18/25] btrfs: Use readahead_batch_length

2020-12-17 Thread Matthew Wilcox
On Thu, Dec 17, 2020 at 12:12:46PM +, Matthew Wilcox wrote: > ehh ... probably an off-by-one. Does subtracting 1 from contig_end fix it? > I'll spool up a test VM shortly and try it out. Yes, this fixed it: - u64 contig_end = contig_start + readahead_batch_length(rac); +

Re: [PATCH 18/25] btrfs: Use readahead_batch_length

2020-12-17 Thread Matthew Wilcox
On Thu, Dec 17, 2020 at 01:15:10AM -0800, John Hubbard wrote: > On 12/16/20 10:23 AM, Matthew Wilcox (Oracle) wrote: > > Implement readahead_batch_length() to determine the number of bytes in > > the current batch of readahead pages and use it in btrfs. > > > > Signed-off-by: Matthew Wilcox (Oracl

Re: [PATCH 18/25] btrfs: Use readahead_batch_length

2020-12-17 Thread John Hubbard
On 12/16/20 10:23 AM, Matthew Wilcox (Oracle) wrote: Implement readahead_batch_length() to determine the number of bytes in the current batch of readahead pages and use it in btrfs. Signed-off-by: Matthew Wilcox (Oracle) --- fs/btrfs/extent_io.c| 6 ++ include/linux/pagemap.h | 9 +++

[PATCH 18/25] btrfs: Use readahead_batch_length

2020-12-16 Thread Matthew Wilcox (Oracle)
Implement readahead_batch_length() to determine the number of bytes in the current batch of readahead pages and use it in btrfs. Signed-off-by: Matthew Wilcox (Oracle) --- fs/btrfs/extent_io.c| 6 ++ include/linux/pagemap.h | 9 + 2 files changed, 11 insertions(+), 4 deletions(-)