Hello Alex, On 1/17/22 23:21, Alex Baranowski wrote: > 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> I tried to apply your patch, but it didn't work (maybe your mailer messed with it?). So I applied a similar patch based on yours. I used a text more similar to the surrounding text, to make it a bit more consistent. <http://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?id=c56180ba830bfd5c5f0668b74e3b3ccc90716c3b> Thanks! Alex swapon.2: CONFIG_DEVICE_PRIVATE decreases number of available swap files by 4 [Aleksander]: 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. Reported-by: Aleksander Baranowski <alex@xxxxxxxxxxxxxx> Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx> diff --git a/man2/swapon.2 b/man2/swapon.2 index 07d5fe86c..29e32f308 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 @@ -190,6 +193,10 @@ Since kernel 2.6.32, the limit is further decreased by 1 if the kernel is built with the .B CONFIG_MEMORY_FAILURE option. +Since kernel 5.14, the limit is further decreased by 4 +if the kernel is built with the +.B CONFIG_DEVICE_PRIVATE +option. .PP Discard of swap pages was introduced in kernel 2.6.29, then made conditional -- Alejandro Colomar Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/ http://www.alejandro-colomar.es/