lkml.org 
[lkml]   [2023]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v2 5/5] shmem: add support to ignore swap
On Wed, Feb 22, 2023 at 06:44:12PM -0800, Luis Chamberlain wrote:
> In doing experimentations with shmem having the option to avoid swap
> becomes a useful mechanism. One of the *raves* about brd over shmem is
> you can avoid swap, but that's not really a good reason to use brd if
> we can instead use shmem. Using brd has its own good reasons to exist,
> but just because "tmpfs" doesn't let you do that is not a great reason
> to avoid it if we can easily add support for it.
>
> I don't add support for reconfiguring incompatible options, but if
> we really wanted to we can add support for that.
>
> To avoid swap we use mapping_set_unevictable() upon inode creation,
> and put a WARN_ON_ONCE() stop-gap on writepages() for reclaim.
>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> ---

We would have use-cases for this in systemd. We currently use ramfs for
systemd's credential logic since ramfs is unswappable. It'd be very neat
if we could use tmpfs instead,

Acked-by: Christian Brauner <brauner@kernel.org>

\
 
 \ /
  Last update: 2023-03-27 00:33    [W:0.086 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site