linux-stable/Documentation
Luis Chamberlain 2c6efe9cf2 shmem: add support to ignore swap
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>
2023-03-28 16:20:15 -07:00
..
ABI docs: sysfs-block: document hidden sysfs entry 2023-03-07 16:40:52 -07:00
PCI
RCU
accel
accounting
admin-guide A small set of updates for x86: 2023-03-05 11:27:48 -08:00
arc
arm
arm64 arm64 updates for 6.3: 2023-02-21 15:27:48 -08:00
block block: stub out and deprecated the capability attribute on the gendisk 2023-02-06 08:44:55 -07:00
bpf bpf, doc: Link to submitting-patches.rst for general patch submission info 2023-03-06 16:44:39 +01:00
cdrom
core-api mm, printk: introduce new format %pGt for page_type 2023-03-28 16:20:09 -07:00
cpu-freq
crypto
dev-tools - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
devicetree sound fixes for 6.3-rc1 2023-03-04 10:53:59 -08:00
doc-guide
driver-api docs: vfio: fix header path 2023-03-14 11:31:57 -06:00
fault-injection
fb
features
filesystems shmem: add support to ignore swap 2023-03-28 16:20:15 -07:00
firmware-guide ACPI: docs: enumeration: Correct reference to the I²C device data type 2023-03-07 14:09:49 +01:00
firmware_class
fpga
gpu drm next for 6.3-rc1 2023-02-22 18:28:03 -08:00
hid It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
hwmon It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
i2c Documentation: i2c: correct spelling 2023-02-15 20:59:44 +01:00
ia64
iio
images
infiniband
input
isdn Documentation: isdn: correct spelling 2023-02-10 16:28:13 -08:00
kbuild Kbuild updates for v6.3 2023-02-26 11:53:25 -08:00
kernel-hacking
leds - Remove Drivers 2023-02-23 15:09:31 -08:00
litmus-tests
livepatch Documentation: livepatch: module-elf-format: Remove local klp_modinfo definition 2023-02-06 08:45:55 -08:00
locking docs: locking: refer to the actual existing config names 2023-02-23 12:26:00 -07:00
loongarch
m68k
maintainer docs: rebasing-and-merging: Drop wrong statement about git 2023-03-07 10:26:22 -07:00
mhi
mips
misc-devices
mm shmem: add support to ignore swap 2023-03-28 16:20:15 -07:00
netlabel
netlink ynl: broaden the license even more 2023-03-16 21:20:32 -07:00
networking xdp: bpf_xdp_metadata use EOPNOTSUPP for no driver support 2023-03-22 09:11:09 -07:00
nios2
nvdimm
nvme
openrisc
parisc
pcmcia
peci
power Power management updates for 6.3-rc1 2023-02-21 12:13:58 -08:00
powerpc
process docs: process: typo fix 2023-03-14 11:31:08 -06:00
riscv Documentation: riscv: fix insufficient list item indent 2023-02-14 16:00:02 -08:00
rust Documentation: rust: Fix arch support table 2023-02-13 10:14:32 +01:00
s390 VFIO updates for v6.3-rc1 2023-02-25 11:52:57 -08:00
scheduler sched/doc: supplement CPU capacity with RISC-V 2023-03-07 10:19:04 -07:00
scsi SCSI misc on 20230222 2023-02-22 13:41:41 -08:00
security
sh
sound It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
sparc
sphinx docs: Use HTML comments for the kernel-toc SPDX line 2023-02-16 16:06:44 -07:00
sphinx-static docs: Add more information to the HTML sidebar 2023-02-08 13:28:27 -07:00
spi
staging
target scsi: target: Documentation: Correct spelling 2023-02-08 18:49:48 -05:00
timers
tools Documentation/rtla: Add hwnoise man page 2023-02-13 23:56:46 -05:00
trace Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
translations docs/mm: hugetlbfs_reserv: fix a reference to a file that doesn't exist 2023-03-07 10:31:49 -07:00
usb docs: usb: Add documentation for the UVC Gadget 2023-03-09 15:18:33 +01:00
userspace-api ynl: broaden the license even more 2023-03-16 21:20:32 -07:00
virt ARM: 2023-02-25 11:30:21 -08:00
w1
watchdog Documentation/watchdog/hpwdt: Fix Format 2023-02-16 17:31:29 -07:00
x86 It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
xtensa
.gitignore
Changes
CodingStyle
Kconfig
Makefile
SubmittingPatches
arch.rst
atomic_bitops.txt
atomic_t.txt
conf.py It has been a moderately calm cycle for documentation; the significant 2023-02-22 12:00:20 -08:00
docutils.conf
dontdiff
index.rst Documentation: front page: use recommended heading adornments 2023-02-23 12:44:51 -07:00
memory-barriers.txt
subsystem-apis.rst