All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ira Weiny <ira.weiny@intel.com>
To: Christopher Lameter <cl@linux.com>
Cc: Dave Chinner <david@fromorbit.com>,
	john.hubbard@gmail.com, Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Al Viro <viro@zeniv.linux.org.uk>,
	Christian Benvenuti <benve@cisco.com>,
	Christoph Hellwig <hch@infradead.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Dennis Dalessandro <dennis.dalessandro@intel.com>,
	Doug Ledford <dledford@redhat.com>, Jan Kara <jack@suse.cz>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Jerome Glisse <jglisse@redhat.com>,
	Matthew Wilcox <willy@infradead.org>,
	Michal Hocko <mhocko@kernel.org>,
	Mike Rapoport <rppt@linux.ibm.com>,
	Mike Marciniszyn <mike.marciniszyn@intel.com>,
	Ralph Campbell <rcampbell@nvidia.com>,
	Tom Talpey <tom@talpey.com>, LKML <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org, John Hubbard <jhubbard@nvidia.com>
Subject: Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions
Date: Tue, 12 Mar 2019 03:39:33 -0700	[thread overview]
Message-ID: <20190312103932.GD1119@iweiny-DESK2.sc.intel.com> (raw)
In-Reply-To: <01000169705aecf0-76f2b83d-ac18-4872-9421-b4b6efe19fc7-000000@email.amazonses.com>

On Tue, Mar 12, 2019 at 05:23:21AM +0000, Christopher Lameter wrote:
> On Mon, 11 Mar 2019, Dave Chinner wrote:
> 
> > > Direct IO on a mmapped file backed page doesnt make any sense.
> >
> > People have used it for many, many years as zero-copy data movement
> > pattern. i.e. mmap the destination file, use direct IO to DMA direct
> > into the destination file page cache pages, fdatasync() to force
> > writeback of the destination file.
> 
> Well we could make that more safe through a special API that designates a
> range of pages in a file in the same way as for RDMA. This is inherently
> not reliable as we found out.

I'm not following.  What API was not reliable?  In[2] we had ideas on such an
API but AFAIK these have not been tried.

From what I have seen the above is racy and is prone to the issues John has
seen.  The difference is that Direct IO has a smaller window than RDMA.  (Or at
least I thought we already established that?)

	"And also remember that while RDMA might be the case at least some
	people care about here it really isn't different from any of the other
	gup + I/O cases, including doing direct I/O to a mmap area.  The only
	difference in the various cases is how long the area should be pinned
	down..."

		-- Christoph Hellwig : https://lkml.org/lkml/2018/10/1/591

> 
> > Now we have copy_file_range() to optimise this sort of data
> > movement, the need for games with mmap+direct IO largely goes away.
> > However, we still can't just remove that functionality as it will
> > break lots of random userspace stuff...
> 
> It is already broken and unreliable. Are there really "lots" of these
> things around? Can we test this by adding a warning in the kernel and see
> where it actually crops up?

IMHO I don't think that the copy_file_range() is going to carry us through the
next wave of user performance requirements.  RDMA, while the first, is not the
only technology which is looking to have direct access to files.  XDP is
another.[1]

Ira

[1] https://www.kernel.org/doc/html/v4.19-rc1/networking/af_xdp.html
[2] https://lore.kernel.org/lkml/20190205175059.GB21617@iweiny-DESK2.sc.intel.com/


  reply	other threads:[~2019-03-12 18:41 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 23:54 [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions john.hubbard
2019-03-06 23:54 ` [PATCH v3 1/1] " john.hubbard
2019-03-08  2:58   ` Christopher Lameter
2019-03-08  2:58     ` Christopher Lameter
2019-03-08  3:15     ` John Hubbard
2019-03-08 17:43       ` Weiny, Ira
2019-03-08 17:57   ` Jerome Glisse
2019-03-08 21:27     ` John Hubbard
2019-03-12 15:30   ` Ira Weiny
2019-03-13  0:38     ` John Hubbard
2019-03-13 14:49       ` Ira Weiny
2019-03-14  3:19         ` John Hubbard
2019-03-07  8:37 ` [PATCH v3 0/1] " Ira Weiny
2019-03-08  3:08 ` Christopher Lameter
2019-03-08  3:08   ` Christopher Lameter
2019-03-08 19:07   ` Jerome Glisse
2019-03-12  4:52     ` Christopher Lameter
2019-03-12  4:52       ` Christopher Lameter
2019-03-12 15:35       ` Jerome Glisse
2019-03-12 15:53         ` Jason Gunthorpe
2019-03-13 19:16         ` Christopher Lameter
2019-03-13 19:16           ` Christopher Lameter
2019-03-13 19:33           ` Jerome Glisse
2019-03-14  9:03           ` Jan Kara
2019-03-14 12:57             ` Jason Gunthorpe
2019-03-14 13:30               ` Jan Kara
2019-03-14 20:25                 ` William Kucharski
2019-03-14 20:37                   ` John Hubbard
2019-03-10 22:47   ` Dave Chinner
2019-03-12  5:23     ` Christopher Lameter
2019-03-12  5:23       ` Christopher Lameter
2019-03-12 10:39       ` Ira Weiny [this message]
2019-03-12 22:11         ` Dave Chinner
2019-03-12 15:23           ` Ira Weiny
2019-03-13 16:03           ` Christoph Hellwig
2019-03-13 19:21             ` Christopher Lameter
2019-03-13 19:21               ` Christopher Lameter
2019-03-14  9:06               ` Jan Kara
2019-03-18 20:12                 ` 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=20190312103932.GD1119@iweiny-DESK2.sc.intel.com \
    --to=ira.weiny@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=benve@cisco.com \
    --cc=cl@linux.com \
    --cc=dan.j.williams@intel.com \
    --cc=david@fromorbit.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=jgg@ziepe.ca \
    --cc=jglisse@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=john.hubbard@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mike.marciniszyn@intel.com \
    --cc=rcampbell@nvidia.com \
    --cc=rppt@linux.ibm.com \
    --cc=tom@talpey.com \
    --cc=viro@zeniv.linux.org.uk \
    --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.