# Re: \[PATCH v15 08/17\] iomap: Pass the iomap\_page into iomap\_set\_range\_uptodate

- From: Matthew Wilcox \<willy@infradead.org\>
- Date: 2021-07-20 11:38:06 
- List: linux-block
- Page: https://ratatoskr.run/linux-block/2021/07/210578
- Thread: https://ratatoskr.run/linux-fsdevel/2021/07/210470/t.md

```text
On Tue, Jul 20, 2021 at 08:57:06AM +0200, Christoph Hellwig wrote:
> On Mon, Jul 19, 2021 at 07:39:52PM +0100, Matthew Wilcox (Oracle) wrote:
> > All but one caller already has the iomap_page, and we can avoid getting
> > it again.
> > 
> > Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> > Reviewed-by: Darrick J. Wong <djwong@kernel.org>
> 
> In general reloading it from a single pointer should be faster than
> passing an extra argument.  What is the rationale here?

I'm not sure we can make that determination in general; it's going to
depend on the number of registers the CPU has, the calling conventions,
how much inlining the compiler chooses to do, etc.

The compiler is actually _forced_ to reload the iop from the page
by the test_bit() in PagePrivate() / folio_test_private().  I want
to kill off that bit, but until I have time to work on that, we
don't have a good workaround.
```
