All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] man2/swapon.2: Make description more clear
@ 2023-12-22  3:07 Yang Xu
  2023-12-22  3:07 ` [PATCH 2/2] swapon.2: Adjust decreased value under CONFIG_DEVICE_PRIVATE Yang Xu
  2023-12-22  9:57 ` [PATCH 1/2] man2/swapon.2: Make description more clear Alejandro Colomar
  0 siblings, 2 replies; 4+ messages in thread
From: Yang Xu @ 2023-12-22  3:07 UTC (permalink / raw)
  To: linux-man; +Cc: Yang Xu

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 man2/swapon.2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man2/swapon.2 b/man2/swapon.2
index a3707ac65..b2651fc39 100644
--- a/man2/swapon.2
+++ b/man2/swapon.2
@@ -164,8 +164,8 @@ Before Linux 2.4.10,
 .B MAX_SWAPFILES
 has the value 8;
 since Linux 2.4.10, it has the value 32.
-Since Linux 2.6.18, the limit is decreased by 2.
-Since Linux 5.19, the limit is decreased by 3 (thus: 29)
+Since Linux 2.6.18, the limit is decreased by 2 (thus 30),
+since Linux 5.19, the limit is decreased by 3 (thus: 29)
 if the kernel is built with the
 .B CONFIG_MIGRATION
 option
-- 
2.27.0


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

* [PATCH 2/2] swapon.2: Adjust decreased value under CONFIG_DEVICE_PRIVATE
  2023-12-22  3:07 [PATCH 1/2] man2/swapon.2: Make description more clear Yang Xu
@ 2023-12-22  3:07 ` Yang Xu
  2023-12-22  9:50   ` Alejandro Colomar
  2023-12-22  9:57 ` [PATCH 1/2] man2/swapon.2: Make description more clear Alejandro Colomar
  1 sibling, 1 reply; 4+ messages in thread
From: Yang Xu @ 2023-12-22  3:07 UTC (permalink / raw)
  To: linux-man; +Cc: Yang Xu

After 4.14 kernel patch [1], it addes SWP_DEVICE_NUM macro and value is 2.
After 5.14 kernel patch[2], it incrase this SWP_DEVICE_NUM macro to 4.
So we should add this info in here to calculate MAX_SWAPFILES.

[1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/swap.h?id=5042db43cc
[2]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/swap.h?id=b756a3b5e
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 man2/swapon.2 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/man2/swapon.2 b/man2/swapon.2
index b2651fc39..21d6416eb 100644
--- a/man2/swapon.2
+++ b/man2/swapon.2
@@ -177,7 +177,8 @@ Since Linux 2.6.32, the limit is further decreased by 1
 if the kernel is built with the
 .B CONFIG_MEMORY_FAILURE
 option.
-Since Linux 5.14, the limit is further decreased by 4
+Since Linux 4.14, the limit is decreased by 2,
+since Linux 5.14, the limit is decreased by 4
 if the kernel is built with the
 .B CONFIG_DEVICE_PRIVATE
 option.
-- 
2.27.0


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

* Re: [PATCH 2/2] swapon.2: Adjust decreased value under CONFIG_DEVICE_PRIVATE
  2023-12-22  3:07 ` [PATCH 2/2] swapon.2: Adjust decreased value under CONFIG_DEVICE_PRIVATE Yang Xu
@ 2023-12-22  9:50   ` Alejandro Colomar
  0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Colomar @ 2023-12-22  9:50 UTC (permalink / raw)
  To: Yang Xu; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]

Hi Yang,

On Thu, Dec 21, 2023 at 10:07:09PM -0500, Yang Xu wrote:
> After 4.14 kernel patch [1], it addes SWP_DEVICE_NUM macro and value is 2.
> After 5.14 kernel patch[2], it incrase this SWP_DEVICE_NUM macro to 4.
> So we should add this info in here to calculate MAX_SWAPFILES.
> 
> [1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/swap.h?id=5042db43cc
> [2]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/swap.h?id=b756a3b5e
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
>  man2/swapon.2 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/man2/swapon.2 b/man2/swapon.2
> index b2651fc39..21d6416eb 100644
> --- a/man2/swapon.2
> +++ b/man2/swapon.2
> @@ -177,7 +177,8 @@ Since Linux 2.6.32, the limit is further decreased by 1
>  if the kernel is built with the
>  .B CONFIG_MEMORY_FAILURE
>  option.
> -Since Linux 5.14, the limit is further decreased by 4
> +Since Linux 4.14, the limit is decreased by 2,
> +since Linux 5.14, the limit is decreased by 4

Why remove "further"?  Please add in parentheses the total value after
the decrease (thus: 123) to clarify what is the limit after so many
decreases.

Have a lovely day,
Alex

>  if the kernel is built with the
>  .B CONFIG_DEVICE_PRIVATE
>  option.
> -- 
> 2.27.0
> 
> 

-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 1/2] man2/swapon.2: Make description more clear
  2023-12-22  3:07 [PATCH 1/2] man2/swapon.2: Make description more clear Yang Xu
  2023-12-22  3:07 ` [PATCH 2/2] swapon.2: Adjust decreased value under CONFIG_DEVICE_PRIVATE Yang Xu
@ 2023-12-22  9:57 ` Alejandro Colomar
  1 sibling, 0 replies; 4+ messages in thread
From: Alejandro Colomar @ 2023-12-22  9:57 UTC (permalink / raw)
  To: Yang Xu; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 964 bytes --]

Hi Yang,

On Thu, Dec 21, 2023 at 10:07:08PM -0500, Yang Xu wrote:
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---

Patch applied.  Thanks!

Have a lovely day,
Alex

>  man2/swapon.2 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/man2/swapon.2 b/man2/swapon.2
> index a3707ac65..b2651fc39 100644
> --- a/man2/swapon.2
> +++ b/man2/swapon.2
> @@ -164,8 +164,8 @@ Before Linux 2.4.10,
>  .B MAX_SWAPFILES
>  has the value 8;
>  since Linux 2.4.10, it has the value 32.
> -Since Linux 2.6.18, the limit is decreased by 2.
> -Since Linux 5.19, the limit is decreased by 3 (thus: 29)
> +Since Linux 2.6.18, the limit is decreased by 2 (thus 30),
> +since Linux 5.19, the limit is decreased by 3 (thus: 29)
>  if the kernel is built with the
>  .B CONFIG_MIGRATION
>  option
> -- 
> 2.27.0
> 
> 

-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2023-12-22  9:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-22  3:07 [PATCH 1/2] man2/swapon.2: Make description more clear Yang Xu
2023-12-22  3:07 ` [PATCH 2/2] swapon.2: Adjust decreased value under CONFIG_DEVICE_PRIVATE Yang Xu
2023-12-22  9:50   ` Alejandro Colomar
2023-12-22  9:57 ` [PATCH 1/2] man2/swapon.2: Make description more clear Alejandro Colomar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.