[PATCH] fixes on swapon.2 CONFIG_DEVICE_PRIVATE decreases number of available swap files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Howdy (It's probably the nearest thing to Polish Siemanko!)!

Firstly I'm sorry - I might send empty mail before this one (misclick).

I noticed that swapon docs are missing some newer information about CONFIG_DEVICE_PRIVATE that decreases the number of available swap files. When it comes to kernel versions that I used https://elixir.bootlin.com/linux/v5.14/source/include/linux/swap.h and https://elixir.bootlin.com/linux/v4.14/source/include/linux/swap.h to check when the changes were introduced. I also tested the manage with `man path-to-file` if it looks OK. I signed off as Aleksander Baranowski as it is my legal name.

Patch:

From 547cff381f0321dd6bffdaa2cc5c6fe9b44464ef Mon Sep 17 00:00:00 2001
From: Alex Baranowski <alex@xxxxxxxxxxxxxx>
Date: Mon, 17 Jan 2022 22:36:34 +0100
Subject: [PATCH] fixes on swapon.2 CONFIG_DEVICE_PRIVATE decreases number of
 available swap files

Signed-off-by: Aleksander Baranowski <alex@xxxxxxxxxxxxxx>
---
 man2/swapon.2 | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/man2/swapon.2 b/man2/swapon.2
index 07d5fe86c..a6c756c4d 100644
--- a/man2/swapon.2
+++ b/man2/swapon.2
@@ -33,6 +33,9 @@
 .\" 2004-12-14 mtk, Anand Kumria: added new errors
 .\" 2007-06-22 Ivana Varekova <varekova@xxxxxxxxxx>, mtk
 .\"     Update text describing limit on number of swap files.
+.\" 2021-01-17 Alex Baranowski <alex@xxxxxxxxxxxxxx>
+.\"     Update information about available swap files decreased by
+.\"     CONFIG_DEVICE_PRIVATE option
 .\"
 .\" FIXME Linux 3.11 added SWAP_FLAG_DISCARD_ONCE and SWAP_FLAG_DISCARD_PAGES
 .\"    commit dcf6b7ddd7df8965727746f89c59229b23180e5a
@@ -189,7 +192,13 @@ and
 Since kernel 2.6.32, the limit is further decreased by 1
 if the kernel is built with the
 .B CONFIG_MEMORY_FAILURE
-option.
+option. Since kernel 4.14, the number of
+.B MAX_SWAPFILES
+might be further decreased by 2 when
+.B CONFIG_DEVICE_PRIVATE
+option is enabled. Since kernel 5.14, the enabled
+.B CONFIG_DEVICE_PRIVATE
+option decrease number of available swap files by 4.
 .PP
 Discard of swap pages was introduced in kernel 2.6.29,
 then made conditional
--
2.27.0


Best,
Alex



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux