linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Popple <apopple@nvidia.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	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: Thu, 27 Mar 2025 07:49:47 -0700	[thread overview]
Message-ID: <jcrkl6my4u3tyjmaoibor4lwe2diox4moo4ap52eu4v3yxhnn3@mmahcrjxeiba> (raw)
In-Reply-To: <Z-NjI8DO6bvWphO3@casper.infradead.org>

On Wed, Mar 26, 2025 at 02:14:59AM +0000, Matthew Wilcox wrote:
> 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.

Thanks for writing up this summary.

> 
> 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).

Right. I agree we don't currently have a good usecase for writeback so the next
revision will definitely only support read-only access.

> 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 ;-)

That all looks about right. I think the flag/indication is a good idea and is
probably the best solution, but I will need to write the code to truely convince
myself of that :-)


  reply	other threads:[~2025-03-27 14:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-16  4:29 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
2025-03-27 14:49     ` Alistair Popple [this message]
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=jcrkl6my4u3tyjmaoibor4lwe2diox4moo4ap52eu4v3yxhnn3@mmahcrjxeiba \
    --to=apopple@nvidia.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox