[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190730102557.GA1700@lst.de>
Date: Tue, 30 Jul 2019 12:25:57 +0200
From: Christoph Hellwig <hch@....de>
To: Jerome Glisse <jglisse@...hat.com>
Cc: Christoph Hellwig <hch@...radead.org>, john.hubbard@...il.com,
Andrew Morton <akpm@...ux-foundation.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Anna Schumaker <anna.schumaker@...app.com>,
"David S . Miller" <davem@...emloft.net>,
Dominique Martinet <asmadeus@...ewreck.org>,
Eric Van Hensbergen <ericvh@...il.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Jason Wang <jasowang@...hat.com>, Jens Axboe <axboe@...nel.dk>,
Latchesar Ionkov <lucho@...kov.net>,
"Michael S . Tsirkin" <mst@...hat.com>,
Miklos Szeredi <miklos@...redi.hu>,
Trond Myklebust <trond.myklebust@...merspace.com>,
Christoph Hellwig <hch@....de>,
Matthew Wilcox <willy@...radead.org>, linux-mm@...ck.org,
LKML <linux-kernel@...r.kernel.org>, ceph-devel@...r.kernel.org,
kvm@...r.kernel.org, linux-block@...r.kernel.org,
linux-cifs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-nfs@...r.kernel.org, linux-rdma@...r.kernel.org,
netdev@...r.kernel.org, samba-technical@...ts.samba.org,
v9fs-developer@...ts.sourceforge.net,
virtualization@...ts.linux-foundation.org,
John Hubbard <jhubbard@...dia.com>,
Minwoo Im <minwoo.im.dev@...il.com>
Subject: Re: [PATCH 03/12] block: bio_release_pages: use flags arg instead
of bool
On Mon, Jul 29, 2019 at 04:57:21PM -0400, Jerome Glisse wrote:
> > All pages releases by bio_release_pages should come from
> > get_get_user_pages, so I don't really see the point here.
>
> No they do not all comes from GUP for see various callers
> of bio_check_pages_dirty() for instance iomap_dio_zero()
>
> I have carefully tracked down all this and i did not do
> anyconvertion just for the fun of it :)
Well, the point is _should_ not necessarily do. iomap_dio_zero adds the
ZERO_PAGE, which we by definition don't need to refcount. So we can
mark this bio BIO_NO_PAGE_REF safely after removing the get_page there.
Note that the equivalent in the old direct I/O code, dio_refill_pages,
will be a little more complicated as it can match user pages and the
ZERO_PAGE in a single bio, so a per-bio flag won't handle it easily.
Maybe we just need to use a separate bio there as well.
In general with series like this we should not encode the status quo an
pile new hacks upon the old one, but thing where we should be and fix
up the old warts while having to wade through all that code.
Powered by blists - more mailing lists