Skip to contentSkip to conversation

iman/man2/swapon.2: update priority section

PATCH In review Baoquan He 3 participants 6 messages Oct 17, 2025 – Nov 25, 2025 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore

Baoquan He

author
#0 lore raw

PATCH v2 1/1 iman/man2/swapon.2: update priority section

This update the description about default priority value which is changed in kernel.

---
 man/man2/swapon.2 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
man/man2/swapon.2 +2 -3
index df5e8d8c7ec6..20e213827733 100644
@@ -60,9 +60,8 @@ These functions may be used only by a privileged process (one having the
 capability).
 .SS Priority
 Each swap area has a priority, either high or low.
-The default priority is low.
-Within the low-priority areas,
-newer areas are even lower priority than older areas.
+The default priority is the lowest,
+and all default areas share the same priority value, -1.
 .P
 All priorities set with
 .I swapflags
Signature · 1 line
2.41.0
#1 lore raw
Quoted 3 lines · Baoquan He

This update the description about default priority value which is changed in kernel.

Thanks for sending this. Would it be possible to include a reference to the related commit — for example, at least the commit subject? Also, does the man page prefer using a link to the kernel patchset?

Quoted 15 lines
---
 man/man2/swapon.2 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
man/man2/swapon.2 +0 -0
index df5e8d8c7ec6..20e213827733 100644

man/man2/swapon.2 These functions may be used only by a privileged process (one having the · line 64

Quoted 8 lines
man/man2/swapon.2 +2 -3
@@ -60,9 +60,8 @@ These functions may be used only by a privileged process (one having the
 capability).
 .SS Priority
 Each swap area has a priority, either high or low.
-The default priority is low.
-Within the low-priority areas,
-newer areas are even lower priority than older areas.
+The default priority is the lowest,
+and all default areas share the same priority value, -1.

Not sure what “default areas” means.
maybe just the below?
"
Areas that are not assigned a priority will receive the default priority of -1. "

Quoted 6 lines
man/man2/swapon.2 +0 -1
 .P
 All priorities set with
 .I swapflags
--

2.41.0

Thanks
Barry

author Reviewed-by Carlos O'Donell
#2 lore raw
Quoted 8 lines · Barry Song
Quoted 3 lines · Baoquan He

This update the description about default priority value which is changed in kernel.

Thanks for sending this. Would it be possible to include a reference to the related commit — for example, at least the commit subject? Also, does the man page prefer using a link to the kernel patchset?

I see a lot of discussion link is provided in man-pages commit log, and haven't seen a kernel commit. But I see kernel version is mentioned to mark since when the man page update is made. It's the first time I update man page, not sure what is better. Would love to hear suggestions to improve. Thanks.

https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git

commit 8982bb673546d95b34f7c35be8cadd8091de2a25

Author: Thiago Jung Bauermann <[email protected]>
Date:   Tue Sep 9 16:13:57 2025 -0300

man/man2/sigaction.2: Update si_code list with Linux v6.16

Update with missing si_code values from Linux v6.16's "include/uapi/asm-generic/siginfo.h".

Message-ID: <[email protected]>

Quoted 22 lines
Quoted 22 lines
---
 man/man2/swapon.2 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
man/man2/swapon.2 +0 -3
index df5e8d8c7ec6..20e213827733 100644
@@ -60,9 +60,8 @@ These functions may be used only by a privileged process (one having the
 capability).
 .SS Priority
 Each swap area has a priority, either high or low.
-The default priority is low.
-Within the low-priority areas,
-newer areas are even lower priority than older areas.
Quoted 8 lines

man/man2/swapon.2 These functions may be used only by a privileged process (one having the · line 64

Quoted 2 lines
man/man2/swapon.2 +2 -0
+The default priority is the lowest,
+and all default areas share the same priority value, -1.

Not sure what “default areas” means.
maybe just the below?
"
Areas that are not assigned a priority will receive the default priority of -1. "

Sounds good to me. I will spin v3 to include the update. Thanks for the great suggesiton.

#3 lore raw

Hi Baoquan, Barry,

Quoted 10 lines · Baoquan He
Quoted 8 lines · Barry Song
Quoted 3 lines · Baoquan He

This update the description about default priority value which is changed in kernel.

Thanks for sending this. Would it be possible to include a reference to the related commit — for example, at least the commit subject? Also, does the man page prefer using a link to the kernel patchset?

Quoted 7 lines

I see a lot of discussion link is provided in man-pages commit log, and haven't seen a kernel commit. But I see kernel version is mentioned to mark since when the man page update is made. It's the first time I update man page, not sure what is better. Would love to hear suggestions to improve. Thanks.

https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git

Feel free to add as much information in the commit message as you want. I'm always able to remove or edit something if I don't want it, but in general, the more information you include, the better. Thanks!

Have a lovely day!
Alex

Quoted 50 lines

commit 8982bb673546d95b34f7c35be8cadd8091de2a25

Author: Thiago Jung Bauermann <[email protected]>
Date:   Tue Sep 9 16:13:57 2025 -0300

man/man2/sigaction.2: Update si_code list with Linux v6.16

Update with missing si_code values from Linux v6.16's "include/uapi/asm-generic/siginfo.h".

Message-ID: <[email protected]>

Quoted 22 lines
Quoted 22 lines
---
 man/man2/swapon.2 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
man/man2/swapon.2 +0 -3
index df5e8d8c7ec6..20e213827733 100644
@@ -60,9 +60,8 @@ These functions may be used only by a privileged process (one having the
 capability).
 .SS Priority
 Each swap area has a priority, either high or low.
-The default priority is low.
-Within the low-priority areas,
-newer areas are even lower priority than older areas.
Quoted 8 lines

man/man2/swapon.2 These functions may be used only by a privileged process (one having the · line 64

Quoted 2 lines
man/man2/swapon.2 +2 -0
+The default priority is the lowest,
+and all default areas share the same priority value, -1.

Not sure what “default areas” means.
maybe just the below?
"
Areas that are not assigned a priority will receive the default priority of -1. "

Sounds good to me. I will spin v3 to include the update. Thanks for the great suggesiton.

Signature · 2 lines
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
#4 lore raw
In reply to Baoquan He

Hi Baoquan,

Quoted 17 lines · Baoquan He

This update the description about default priority value which is changed in kernel.

---
 man/man2/swapon.2 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
man/man2/swapon.2 +0 -0
index df5e8d8c7ec6..20e213827733 100644

man/man2/swapon.2 These functions may be used only by a privileged process (one having the · line 64

Quoted 8 lines
man/man2/swapon.2 +2 -3
@@ -60,9 +60,8 @@ These functions may be used only by a privileged process (one having the
 capability).
 .SS Priority
 Each swap area has a priority, either high or low.
-The default priority is low.
-Within the low-priority areas,
-newer areas are even lower priority than older areas.
+The default priority is the lowest,
+and all default areas share the same priority value, -1.

Please document the old behavior in the HISTORY section.

Have a lovely day!
Alex

Quoted 6 lines
man/man2/swapon.2 +0 -0
 .P
 All priorities set with
 .I swapflags
Signature · 1 line
2.41.0
Signature · 2 lines
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
author
#5 lore raw
Quoted 15 lines · Alejandro Colomar

Hi Baoquan,

Quoted 12 lines · Baoquan He

This update the description about default priority value which is changed in kernel.

---
 man/man2/swapon.2 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Quoted 15 lines

man/man2/swapon.2 These functions may be used only by a privileged process (one having the · line 64

Quoted 13 lines
man/man2/swapon.2 +2 -3
index df5e8d8c7ec6..20e213827733 100644
@@ -60,9 +60,8 @@ These functions may be used only by a privileged process (one having the
 capability).
 .SS Priority
 Each swap area has a priority, either high or low.
-The default priority is low.
-Within the low-priority areas,
-newer areas are even lower priority than older areas.
+The default priority is the lowest,
+and all default areas share the same priority value, -1.

Please document the old behavior in the HISTORY section.

Sure, I will send a new version once the relevant kernel patches are merged into linus's mainline kernel. Now, it's in Andrew Mortan's MM tree, the commits are temporary.

Will add the old behaviour as you suggested in v3. Thanks a lot for your suggestion.

Thanks
Baoquan