All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Glisse <jglisse@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: kvm@vger.kernel.org, "Michael S . Tsirkin" <mst@redhat.com>,
	virtualization@lists.linux-foundation.org, linux-mm@kvack.org,
	linux-cifs@vger.kernel.org, Miklos Szeredi <miklos@szeredi.hu>,
	linux-rdma@vger.kernel.org, Matthew Wilcox <willy@infradead.org>,
	Christoph Hellwig <hch@infradead.org>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Minwoo Im <minwoo.im.dev@gmail.com>,
	v9fs-developer@lists.sourceforge.net,
	Eric Van Hensbergen <ericvh@gmail.com>,
	John Hubbard <jhubbard@nvidia.com>,
	john.hubbard@gmail.com, linux-block@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	ceph-devel@vger.kernel.org,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	Jens Axboe <axboe@kernel.dk>,
	linux-nfs@vger.kernel.org, netdev@vger.kernel.org,
	samba-technical@lists.samba.org,
	LKML <linux-kernel@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	linux-fsdevel@vger.kernel.org, Andrew
Subject: Re: [PATCH 03/12] block: bio_release_pages: use flags arg instead of bool
Date: Tue, 30 Jul 2019 11:57:02 -0400	[thread overview]
Message-ID: <20190730155702.GB10366__5622.62215405411$1564502797$gmane$org@redhat.com> (raw)
In-Reply-To: <20190730102557.GA1700@lst.de>

On Tue, Jul 30, 2019 at 12:25:57PM +0200, Christoph Hellwig wrote:
> 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.

Other user can also add page that are not coming from GUP but need to
have a reference see __blkdev_direct_IO() saddly bio get fill from many
different places and not always with GUP. So we can not say that all
pages here are coming from bio. I had a different version of the patchset
i think that was adding a new release dirty function for GUP versus non
GUP bio. I posted it a while ago, i will try to dig it up once i am
back.

Cheers,
Jérôme

  reply	other threads:[~2019-07-30 15:57 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24  4:25 [PATCH 00/12] block/bio, fs: convert put_page() to put_user_page*() john.hubbard
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25 ` [PATCH 01/12] mm/gup: add make_dirty arg to put_user_pages_dirty_lock() john.hubbard
2019-07-24  4:25   ` john.hubbard
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25 ` [PATCH 02/12] iov_iter: add helper to test if an iter would use GUP v2 john.hubbard
2019-07-24  4:25   ` john.hubbard
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25 ` [PATCH 03/12] block: bio_release_pages: use flags arg instead of bool john.hubbard
2019-07-24  4:25   ` john.hubbard
2019-07-24  5:30   ` Christoph Hellwig
2019-07-24  5:30   ` Christoph Hellwig
2019-07-24  5:30     ` Christoph Hellwig
2019-07-29 20:57     ` Jerome Glisse
2019-07-29 20:57       ` Jerome Glisse
2019-07-30 10:25       ` Christoph Hellwig
2019-07-30 10:25         ` Christoph Hellwig
2019-07-30 15:57         ` Jerome Glisse [this message]
2019-07-30 15:57         ` Jerome Glisse
2019-07-30 15:57           ` Jerome Glisse
2019-08-01  8:20           ` Christoph Hellwig
2019-08-01  8:20           ` Christoph Hellwig
2019-08-01  8:20             ` Christoph Hellwig
2019-07-30 10:25       ` Christoph Hellwig
2019-07-29 20:57     ` Jerome Glisse
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25 ` [PATCH 04/12] block: bio_release_pages: convert put_page() to put_user_page*() john.hubbard
2019-07-24  4:25   ` john.hubbard
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25 ` [PATCH 05/12] block_dev: " john.hubbard
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25   ` john.hubbard
2019-07-24  4:25 ` [PATCH 06/12] fs/nfs: " john.hubbard
2019-07-24  4:25   ` john.hubbard
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25 ` [PATCH 07/12] vhost-scsi: " john.hubbard
2019-07-24  4:25   ` john.hubbard
2019-07-24  4:34   ` John Hubbard
2019-07-24  4:34     ` John Hubbard
2019-07-24  4:34   ` John Hubbard
2019-07-24  8:07   ` Michael S. Tsirkin
2019-07-24  8:07     ` Michael S. Tsirkin
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25 ` [PATCH 08/12] fs/cifs: " john.hubbard
2019-07-24  4:25   ` john.hubbard
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25 ` [PATCH 09/12] fs/fuse: " john.hubbard
2019-07-24  4:25   ` john.hubbard
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25 ` [PATCH 10/12] fs/ceph: " john.hubbard
2019-07-24  4:25   ` john.hubbard
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25 ` [PATCH 11/12] 9p/net: " john.hubbard
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25   ` john.hubbard
2019-07-24  4:25 ` [PATCH 12/12] fs/ceph: fix a build warning: returning a value from void function john.hubbard
2019-07-24  4:25 ` john.hubbard
2019-07-24  4:25   ` john.hubbard
2019-07-24  6:17 ` [PATCH 00/12] block/bio, fs: convert put_page() to put_user_page*() Christoph Hellwig
2019-07-24  6:17 ` Christoph Hellwig
2019-07-24  6:17   ` Christoph Hellwig
2019-07-24 23:23   ` John Hubbard
2019-07-24 23:23     ` John Hubbard
2019-08-05 22:54   ` John Hubbard
2019-08-05 22:54     ` John Hubbard
2019-08-07  6:34     ` Christoph Hellwig
2019-08-07  6:34     ` Christoph Hellwig
2019-08-07  6:34       ` Christoph Hellwig
2019-08-07  6:38       ` John Hubbard
2019-08-07  6:38         ` John Hubbard
2019-07-25  0:41 ` Bob Liu
2019-07-25  0:41   ` Bob Liu
2019-07-26  1:24   ` John Hubbard
2019-07-26  1:24     ` John Hubbard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='20190730155702.GB10366__5622.62215405411$1564502797$gmane$org@redhat.com' \
    --to=jglisse@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=ceph-devel@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=ericvh@gmail.com \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=john.hubbard@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=minwoo.im.dev@gmail.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    --cc=trond.myklebust@hammerspace.com \
    --cc=v9fs-developer@lists.sourceforge.net \
    --cc=viro@zeniv.linux.org.uk \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.