lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z9G0dm3bPgnM3AMa@infradead.org>
Date: Wed, 12 Mar 2025 09:21:10 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Suren Baghdasaryan <surenb@...gle.com>
Cc: Christoph Hellwig <hch@...radead.org>, Sooyong Suk <s.suk@...sung.com>,
	Jaewon Kim <jaewon31.kim@...il.com>, viro@...iv.linux.org.uk,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	linux-mm@...ck.org, spssyr@...il.com, axboe@...nel.dk,
	linux-block@...r.kernel.org, dhavale@...gle.com
Subject: Re: [RFC PATCH] block, fs: use FOLL_LONGTERM as gup_flags for direct
 IO

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ