Thread (6 messages) flat view 6 messages, 3 authors, 2021-01-08

Re: [RFC PATCH] fs: block_dev: compute nr_vecs hint for improving writeback bvecs allocation

From: Ming Lei <hidden>
Date: 2021-01-06 08:47:35
Also in: linux-fsdevel, linux-xfs, lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help