Re: [PATCH v7 6/8] block: Make bio structs pin pages rather than ref'ing if appropriate
From: Christoph Hellwig <hch@infradead.org>
Date: 2023-01-23 14:49:35
Also in:
linux-fsdevel, lkml
From: Christoph Hellwig <hch@infradead.org>
Date: 2023-01-23 14:49:35
Also in:
linux-fsdevel, lkml
On Mon, Jan 23, 2023 at 11:28:40AM +0000, David Howells wrote:
void __bio_release_pages(struct bio *bio, bool mark_dirty)
{
unsigned int gup_flags = bio_to_gup_flags(bio);
struct bvec_iter_all iter_all;
struct bio_vec *bvec;
bio_for_each_segment_all(bvec, bio, iter_all) {
if (mark_dirty && !PageCompound(bvec->bv_page))
set_page_dirty_lock(bvec->bv_page);
>>>> page_put_unpin(bvec->bv_page, gup_flags);
}
}
that ought to be a call to bio_release_page(), but the optimiser doesn't want
to inline it:-/Why? __bio_release_pages is the fast path, no need to force using bio_relese_page which is otherwise only used for error cleanup.