linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: John Hubbard <jhubbard@nvidia.com>
Cc: David Hildenbrand <david@redhat.com>,
	David Howells <dhowells@redhat.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	willy@infradead.org, linux-mm@kvack.org,
	Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org
Subject: Re: Does GUP page unpinning have to be done in the pinning context?
Date: Sun, 6 Apr 2025 23:39:01 -0700	[thread overview]
Message-ID: <Z_NzBWIy-QvFBQZk@infradead.org> (raw)
In-Reply-To: <dcb80dc4-a9f7-44d8-b88c-7221ea29deab@nvidia.com>

On Fri, Apr 04, 2025 at 09:59:40AM -0700, John Hubbard wrote:
> > gup_put_folio() seems to only rely on per-folio information (esp.
> > node_stat_mod_folio).
> > 
> > So there should not be such a context requirement.
> 
> That is correct. The essence of gup/pup is that it operates on
> struct pages, and doesn't have any "moral" connection to higher
> layers or additional process context.

Hmm, indeed.  I misremembered why the block based direct I/O code is
doing the process context offload, which is to call set_page_dirty to
redirty pages where the dirty bit was cleared during direct I/O.

Which I think now that all block based file systems use FOLL_PIN
shouldn't be needed anymore, because no one can clear the dirty bit
while the folios are pinned?



  reply	other threads:[~2025-04-07  6:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-04 10:20 David Howells
2025-04-04 10:29 ` David Hildenbrand
2025-04-04 16:59   ` John Hubbard
2025-04-07  6:39     ` Christoph Hellwig [this message]
2025-04-10  2:56       ` John Hubbard
2025-04-10  7:28         ` Christoph Hellwig
2025-04-10 19:11           ` John Hubbard
2025-04-10 19:14             ` Matthew Wilcox
2025-04-10 19:34               ` John Hubbard
2025-05-12  6:21             ` 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_NzBWIy-QvFBQZk@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=david@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-block@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