Thread (45 messages) 45 messages, 4 authors, 2021-08-12

Re: [PATCH 10/16] tmpfs: fcntl(fd, F_MEM_LOCK) to memlock a tmpfs file

From: Matthew Wilcox <willy@infradead.org>
Date: 2021-08-03 01:40:40
Also in: linux-fsdevel, linux-mm, lkml

On Fri, Jul 30, 2021 at 12:55:22AM -0700, Hugh Dickins wrote:
A new uapi to lock the files on tmpfs in memory, to protect against swap
without mapping the files. This commit introduces two new commands to
fcntl and shmem: F_MEM_LOCK and F_MEM_UNLOCK. The locking will be
charged against RLIMIT_MEMLOCK of uid in namespace of the caller.
It's not clear to me why this is limited to shmfs.  Would it not also
make sense for traditional filesystems, eg to force chrome's text pages
to stay in the page cache, no matter how much memory the tabs allocate?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help