linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Alistair Popple <apopple@nvidia.com>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 0/6] Allow file-backed or shared device private pages
Date: Wed, 26 Mar 2025 02:14:59 +0000	[thread overview]
Message-ID: <Z-NjI8DO6bvWphO3@casper.infradead.org> (raw)
In-Reply-To: <Z9e7Vye7OHSbEEx_@infradead.org>

On Sun, Mar 16, 2025 at 11:04:07PM -0700, Christoph Hellwig wrote:
> On Sun, Mar 16, 2025 at 03:29:23PM +1100, Alistair Popple wrote:
> > This series lifts that restriction by allowing ZONE_DEVICE private pages to
> > exist in the pagecache.
> 
> You'd better provide a really good argument for why we'd even want
> to do that.  So far this cover letter fails to do that.

Alistair and I discussed this during his session at LSFMM today.
Here's what I think we agreed to.

The use case is a file containing a potentially very large data set.
Some phases of processing that data set are best done on the GPU, other
phases on the CPU.  We agreed that shared writable mmap was not actually
needed (it might need to be supported for correctness, but it's not a
performance requirement).

So, there's no need to put DEVICE_PRIVATE pages in the page cache.
Instead the GPU will take a copy of the page(s).  We agreed that there
will have to be some indication (probably a folio flag?) that the GPU has
or may have a copy of (some of) the folio so that it can be invalidated
if the page is removed due to truncation / eviction.

Alistair, let me know if that's not what you think we agreed to ;-)

  reply	other threads:[~2025-03-26  2:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-16  4:29 [PATCH RFC 0/6] Allow file-backed or shared device private pages Alistair Popple
2025-03-16  4:29 ` [PATCH RFC 1/6] mm/migrate_device.c: Don't read dirty bit of non-present PTEs Alistair Popple
2025-03-16  4:29 ` [PATCH RFC 2/6] mm/migrate: Support file-backed pages with migrate_vma Alistair Popple
2025-03-16  4:29 ` [PATCH RFC 3/6] mm: Allow device private pages to exist in page cache Alistair Popple
2025-03-16  4:29 ` [PATCH RFC 4/6] mm: Implement writeback for share device private pages Alistair Popple
2025-03-16  4:29 ` [PATCH RFC 5/6] selftests/hmm: Add file-backed migration tests Alistair Popple
2025-03-16  4:29 ` [PATCH RFC 6/6] nouveau: Add SVM support for migrating file-backed pages to the GPU Alistair Popple
2025-03-17  6:04 ` [PATCH RFC 0/6] Allow file-backed or shared device private pages Christoph Hellwig
2025-03-26  2:14   ` Matthew Wilcox [this message]
2025-03-27 14:49     ` Alistair Popple
2025-03-27 16:47       ` Matthew Wilcox
2025-04-07  9:15     ` Christoph Hellwig

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=Z-NjI8DO6bvWphO3@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=apopple@nvidia.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).