From: Christoph Hellwig <hch@infradead.org>
To: Suren Baghdasaryan <surenb@google.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Sooyong Suk <s.suk@samsung.com>,
Jaewon Kim <jaewon31.kim@gmail.com>,
viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, linux-mm@kvack.org, spssyr@gmail.com,
axboe@kernel.dk, linux-block@vger.kernel.org, dhavale@google.com
Subject: Re: [RFC PATCH] block, fs: use FOLL_LONGTERM as gup_flags for direct IO
Date: Wed, 12 Mar 2025 09:21:10 -0700 [thread overview]
Message-ID: <Z9G0dm3bPgnM3AMa@infradead.org> (raw)
In-Reply-To: <CAJuCfpHG9EWAC9p7hcOH6oPMWMMSDr91HDt7ZuX2M7=j6bxuGw@mail.gmail.com>
On Wed, Mar 12, 2025 at 09:06:02AM -0700, Suren Baghdasaryan wrote:
> > Any file or anonymous folio can be temporarily pinned for I/O and only
> > moved once that completes. Direct I/O is one use case for that but there
> > are plenty others. I'm not sure how you define "beforehand", but the
> > pinning is visible in the _pincount field.
>
> Well, by "beforehand" I mean that when allocating for Direct I/O
> operation we know this memory will be pinned,
Direct I/O is performed on anonymous (or more rarely) file backed pages
that are allocated from the normal allocators. Some callers might know
that they are eventually going to perform direct I/O on them, but most
won't as that information is a few layers removed from them or totally
hidden in libraries.
The same is true for other pin_user_pages operations. If you want memory
that is easily available for CMA allocations it better not be given out
as anonymous memory, and probably also not as file backed memory. Which
just leaves you with easily migratable kernel allocations, i.e. not much.
next prev parent reply other threads:[~2025-03-12 16:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250306074101epcas1p4b24ac546f93df2c7fe3176607b20e47f@epcas1p4.samsung.com>
2025-03-06 7:40 ` Sooyong Suk
2025-03-06 15:26 ` Christoph Hellwig
2025-03-06 23:28 ` Jaewon Kim
2025-03-07 2:07 ` Sooyong Suk
2025-03-07 2:28 ` Suren Baghdasaryan
2025-03-07 6:38 ` Sooyong Suk
2025-03-12 15:17 ` Christoph Hellwig
2025-03-12 15:20 ` Suren Baghdasaryan
2025-03-12 15:25 ` Christoph Hellwig
2025-03-12 15:38 ` Suren Baghdasaryan
2025-03-12 15:52 ` Christoph Hellwig
2025-03-12 16:03 ` Bart Van Assche
2025-03-12 16:06 ` Suren Baghdasaryan
2025-03-12 16:21 ` Christoph Hellwig [this message]
2025-03-07 20:23 ` Matthew Wilcox
2025-03-07 21:37 ` Suren Baghdasaryan
2025-03-12 15:21 ` Christoph Hellwig
2025-03-13 22:49 ` David Hildenbrand
2025-03-15 1:04 ` John Hubbard
2025-03-15 23:00 ` David Hildenbrand
2025-03-15 23:09 ` Zi Yan
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=Z9G0dm3bPgnM3AMa@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=dhavale@google.com \
--cc=jaewon31.kim@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=s.suk@samsung.com \
--cc=spssyr@gmail.com \
--cc=surenb@google.com \
--cc=viro@zeniv.linux.org.uk \
/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