[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y86ecQ6EAr5BDvw+@infradead.org>
Date: Mon, 23 Jan 2023 06:49:21 -0800
From: Christoph Hellwig <hch@...radead.org>
To: David Howells <dhowells@...hat.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Al Viro <viro@...iv.linux.org.uk>,
Matthew Wilcox <willy@...radead.org>,
Jens Axboe <axboe@...nel.dk>, Jan Kara <jack@...e.cz>,
Jeff Layton <jlayton@...nel.org>,
Logan Gunthorpe <logang@...tatee.com>,
linux-fsdevel@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v7 6/8] block: Make bio structs pin pages rather than
ref'ing if appropriate
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.
Powered by blists - more mailing lists