lkml.org 
[lkml]   [2021]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] fs: block_dev: compute nr_vecs hint for improving writeback bvecs allocation
On Tue, Jan 05, 2021 at 07:39:38PM +0100, Christoph Hellwig wrote:
> At least for iomap I think this is the wrong approach. Between the
> iomap and writeback_control we know the maximum size of the writeback
> request and can just use that.

I think writeback_control can tell us nothing about max pages in single
bio:

- wbc->nr_to_write controls how many pages to writeback, this pages
usually don't belong to same bio. Also this number is often much
bigger than BIO_MAX_PAGES.

- wbc->range_start/range_end is similar too, which is often much more
bigger than BIO_MAX_PAGES.

Also page/blocks_in_page can be mapped to different extent too, which is
only available when wpc->ops->map_blocks() is returned, which looks not
different with mpage_writepages(), in which bio is allocated with
BIO_MAX_PAGES vecs too.

Or you mean we can use iomap->length for this purpose? But iomap->length
still is still too big in case of xfs.

--
Ming

\
 
 \ /
  Last update: 2021-01-06 09:50    [W:0.049 / U:1.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site