public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fixes on swapon.2 CONFIG_DEVICE_PRIVATE decreases number of, available swap files
@ 2022-01-17 21:40 Alex Baranowski
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Baranowski @ 2022-01-17 21:40 UTC (permalink / raw)
  To: linux-man



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] fixes on swapon.2 CONFIG_DEVICE_PRIVATE decreases number of available swap files
@ 2022-01-17 22:21 Alex Baranowski
  2022-01-25 18:29 ` Alejandro Colomar (man-pages)
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Baranowski @ 2022-01-17 22:21 UTC (permalink / raw)
  To: linux-man, mtk.manpages, alx.manpages

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@euro-linux.com>
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@euro-linux.com>
---
  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@redhat.com>, mtk
  .\"     Update text describing limit on number of swap files.
+.\" 2021-01-17 Alex Baranowski <alex@euro-linux.com>
+.\"     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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fixes on swapon.2 CONFIG_DEVICE_PRIVATE decreases number of available swap files
  2022-01-17 22:21 [PATCH] fixes on swapon.2 CONFIG_DEVICE_PRIVATE decreases number of available swap files Alex Baranowski
@ 2022-01-25 18:29 ` Alejandro Colomar (man-pages)
  0 siblings, 0 replies; 3+ messages in thread
From: Alejandro Colomar (man-pages) @ 2022-01-25 18:29 UTC (permalink / raw)
  To: Alex Baranowski; +Cc: linux-man, mtk.manpages

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@euro-linux.com>
> 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@euro-linux.com>

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@euro-linux.com>
    Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

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@redhat.com>, mtk
 .\"     Update text describing limit on number of swap files.
+.\" 2021-01-17 Alex Baranowski <alex@euro-linux.com>
+.\"     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/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-25 18:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-17 22:21 [PATCH] fixes on swapon.2 CONFIG_DEVICE_PRIVATE decreases number of available swap files Alex Baranowski
2022-01-25 18:29 ` Alejandro Colomar (man-pages)
  -- strict thread matches above, loose matches on Subject: below --
2022-01-17 21:40 [PATCH] fixes on swapon.2 CONFIG_DEVICE_PRIVATE decreases number of, " Alex Baranowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox