mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
2c6efe9cf2
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. Link: https://lkml.kernel.org/r/20230309230545.2930737-7-mcgrof@kernel.org Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Acked-by: Christian Brauner <brauner@kernel.org> Tested-by: Xin Hao <xhao@linux.alibaba.com> Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> Cc: Adam Manzanares <a.manzanares@samsung.com> Cc: David Hildenbrand <david@redhat.com> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Hugh Dickins <hughd@google.com> Cc: Kees Cook <keescook@chromium.org> Cc: Matthew Wilcox <willy@infradead.org> Cc: Pankaj Raghav <p.raghav@samsung.com> Cc: Yosry Ahmed <yosryahmed@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
||
---|---|---|
.. | ||
damon | ||
active_mm.rst | ||
arch_pgtable_helpers.rst | ||
balance.rst | ||
bootmem.rst | ||
free_page_reporting.rst | ||
frontswap.rst | ||
highmem.rst | ||
hmm.rst | ||
hugetlbfs_reserv.rst | ||
hwpoison.rst | ||
index.rst | ||
ksm.rst | ||
memory-model.rst | ||
mmu_notifier.rst | ||
multigen_lru.rst | ||
numa.rst | ||
oom.rst | ||
overcommit-accounting.rst | ||
page_allocation.rst | ||
page_cache.rst | ||
page_frags.rst | ||
page_migration.rst | ||
page_owner.rst | ||
page_reclaim.rst | ||
page_table_check.rst | ||
page_tables.rst | ||
physical_memory.rst | ||
process_addrs.rst | ||
remap_file_pages.rst | ||
shmfs.rst | ||
slab.rst | ||
slub.rst | ||
split_page_table_lock.rst | ||
swap.rst | ||
transhuge.rst | ||
unevictable-lru.rst | ||
vmalloc.rst | ||
vmalloced-kernel-stacks.rst | ||
vmemmap_dedup.rst | ||
z3fold.rst | ||
zsmalloc.rst |