Skip to contentSkip to conversation

get_phys_pages.3: glibc gets the info from sysinfo(2) since 2.23

PATCH In review Alejandro Colomar 2 participants 6 messages Dec 30, 2020 – Jan 1, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 get_phys_pages.3: glibc gets the info from sysinfo(2) since 2.23

See glibc's commit: 0ce657c576bf1b24
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0ce657c576bf1b24

---
 man3/get_phys_pages.3 | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
man3/get_phys_pages.3 +9 -4
index 35f83fedb..a8a1ce3f4 100644
@@ -55,15 +55,20 @@ The system could not provide the required information
 (possibly because the
 .I /proc
 filesystem was not mounted).
-.SH CONFORMING TO
-These functions are GNU extensions.
-.SH NOTES
-These functions obtain the required information by scanning the
+.SH VERSIONS
+Before glibc 2.23,
+these functions obtained the required information by scanning the
 .I MemTotal
 and
 .I MemFree
 fields of
 .IR /proc/meminfo .
+.SH CONFORMING TO
+These functions are GNU extensions.
+.SH NOTES
+Since glibc 2.23,
+these functions obtain the required information by calling
+.BR sysinfo (2).
 .PP
 The following
 .BR sysconf (3)
Signature · 1 line
2.29.2
#1 lore raw

Hi Alewx,

Quoted 19 lines · Alejandro Colomar

See glibc's commit: 0ce657c576bf1b24
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0ce657c576bf1b24

---
 man3/get_phys_pages.3 | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
man3/get_phys_pages.3 +0 -2
index 35f83fedb..a8a1ce3f4 100644
@@ -55,15 +55,20 @@ The system could not provide the required information
 (possibly because the
 .I /proc
 filesystem was not mounted).
-.SH CONFORMING TO
-These functions are GNU extensions.

man3/get_phys_pages.3 The system could not provide the required information · line 65

Quoted 10 lines
man3/get_phys_pages.3 +3 -2
-.SH NOTES
-These functions obtain the required information by scanning the
+.SH VERSIONS
+Before glibc 2.23,
+these functions obtained the required information by scanning the
 .I MemTotal
 and
 .I MemFree
 fields of
 .IR /proc/meminfo .

Thanks for the patch. But I think it would be better to put all the info into NOTES, rather than splitting some out into VERSIONS.

man3/get_phys_pages.3 The system could not provide the required information · line 67

Quoted 2 lines
man3/get_phys_pages.3 +2 -0
+.SH CONFORMING TO
+These functions are GNU extensions.

And it's good to add this, but let's make it a separate patch.

man3/get_phys_pages.3 The system could not provide the required information · line 74

Quoted 7 lines
man3/get_phys_pages.3 +4 -0
+.SH NOTES
+Since glibc 2.23,
+these functions obtain the required information by calling
+.BR sysinfo (2).
 .PP
 The following
 .BR sysconf (3)

Thanks,

Michael

Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#2 lore raw
Quoted 37 lines · Michael Kerrisk (man-pages)

Hi Alewx,

Quoted 19 lines · Alejandro Colomar

See glibc's commit: 0ce657c576bf1b24
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0ce657c576bf1b24

---
 man3/get_phys_pages.3 | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
man3/get_phys_pages.3 +0 -2
index 35f83fedb..a8a1ce3f4 100644
@@ -55,15 +55,20 @@ The system could not provide the required information
 (possibly because the
 .I /proc
 filesystem was not mounted).
-.SH CONFORMING TO
-These functions are GNU extensions.

man3/get_phys_pages.3 The system could not provide the required information · line 65

Quoted 10 lines
man3/get_phys_pages.3 +3 -2
-.SH NOTES
-These functions obtain the required information by scanning the
+.SH VERSIONS
+Before glibc 2.23,
+these functions obtained the required information by scanning the
 .I MemTotal
 and
 .I MemFree
 fields of
 .IR /proc/meminfo .

Thanks for the patch. But I think it would be better to put all the info into NOTES, rather than splitting some out into VERSIONS.

Quoted 4 lines

man3/get_phys_pages.3 The system could not provide the required information · line 67

Quoted 2 lines
man3/get_phys_pages.3 +2 -0
+.SH CONFORMING TO
+These functions are GNU extensions.

And it's good to add this, but let's make it a separate patch.

Hi Michael,

I didn't add that.
This is one of those times when git provides unreadable diffs. Please have a closer look at the diff,
and also at the rendered output.

Thanks,

Alex

Quoted 15 lines

man3/get_phys_pages.3 The system could not provide the required information · line 74

Quoted 8 lines
man3/get_phys_pages.3 +4 -0
+.SH NOTES
+Since glibc 2.23,
+these functions obtain the required information by calling
+.BR sysinfo (2).
 .PP
 The following
 .BR sysconf (3)

Thanks,

Michael

#3 lore raw
Quoted 43 lines · Alejandro Colomar (man-pages)
Quoted 40 lines · Michael Kerrisk (man-pages)

Hi Alewx,

Quoted 19 lines · Alejandro Colomar

See glibc's commit: 0ce657c576bf1b24
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0ce657c576bf1b24

---
 man3/get_phys_pages.3 | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
man3/get_phys_pages.3 +0 -2
index 35f83fedb..a8a1ce3f4 100644
@@ -55,15 +55,20 @@ The system could not provide the required information
 (possibly because the
 .I /proc
 filesystem was not mounted).
-.SH CONFORMING TO
-These functions are GNU extensions.

man3/get_phys_pages.3 The system could not provide the required information · line 65

Quoted 10 lines
man3/get_phys_pages.3 +3 -2
-.SH NOTES
-These functions obtain the required information by scanning the
+.SH VERSIONS
+Before glibc 2.23,
+these functions obtained the required information by scanning the
 .I MemTotal
 and
 .I MemFree
 fields of
 .IR /proc/meminfo .

Thanks for the patch. But I think it would be better to put all the info into NOTES, rather than splitting some out into VERSIONS.

Quoted 2 lines
man3/get_phys_pages.3 +2 -0
+.SH CONFORMING TO
+These functions are GNU extensions.
Quoted 8 lines
Quoted 1 line

And it's good to add this, but let's make it a separate patch.

Hi Michael,

I didn't add that.
This is one of those times when git provides unreadable diffs. Please have a closer look at the diff,
and also at the rendered output.

Yes, I see now.

Still, it would be best to put this piece into NOTES:

[[
Before glibc 2.23,
these functions obtained the required information by scanning the .I MemTotal
Before glibc 2.23,
these functions obtained the required information by scanning the .I MemTotal
]]

Thanks,

Michael

Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#4 lore raw
Quoted 57 lines · Michael Kerrisk (man-pages)
Quoted 43 lines · Alejandro Colomar (man-pages)
Quoted 40 lines · Michael Kerrisk (man-pages)

Hi Alewx,

Quoted 19 lines · Alejandro Colomar

See glibc's commit: 0ce657c576bf1b24
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0ce657c576bf1b24

---
 man3/get_phys_pages.3 | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
man3/get_phys_pages.3 +0 -2
index 35f83fedb..a8a1ce3f4 100644
@@ -55,15 +55,20 @@ The system could not provide the required information
 (possibly because the
 .I /proc
 filesystem was not mounted).
-.SH CONFORMING TO
-These functions are GNU extensions.

man3/get_phys_pages.3 The system could not provide the required information · line 65

Quoted 10 lines
man3/get_phys_pages.3 +3 -2
-.SH NOTES
-These functions obtain the required information by scanning the
+.SH VERSIONS
+Before glibc 2.23,
+these functions obtained the required information by scanning the
 .I MemTotal
 and
 .I MemFree
 fields of
 .IR /proc/meminfo .

Thanks for the patch. But I think it would be better to put all the info into NOTES, rather than splitting some out into VERSIONS.

Quoted 2 lines
man3/get_phys_pages.3 +2 -0
+.SH CONFORMING TO
+These functions are GNU extensions.
Quoted 8 lines
Quoted 1 line

And it's good to add this, but let's make it a separate patch.

Hi Michael,

I didn't add that.
This is one of those times when git provides unreadable diffs. Please have a closer look at the diff,
and also at the rendered output.

Yes, I see now.

Still, it would be best to put this piece into NOTES:

Quoted 8 lines

[[
Before glibc 2.23,
these functions obtained the required information by scanning the .I MemTotal
Before glibc 2.23,
these functions obtained the required information by scanning the .I MemTotal
]]

Hi Michael,

I've seen you've applied the patch already; maybe by accident?

I don't know exactly how you prefer it, so maybe now you can move around the text to NOTES in a new commit.

Thanks,

Alex

Quoted 5 lines

Thanks,

Michael

#5 lore raw
Quoted 69 lines · Alejandro Colomar (man-pages)
Quoted 57 lines · Michael Kerrisk (man-pages)
Quoted 43 lines · Alejandro Colomar (man-pages)
Quoted 40 lines · Michael Kerrisk (man-pages)

Hi Alewx,

Quoted 19 lines · Alejandro Colomar

See glibc's commit: 0ce657c576bf1b24
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0ce657c576bf1b24

---
 man3/get_phys_pages.3 | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
man3/get_phys_pages.3 +0 -2
index 35f83fedb..a8a1ce3f4 100644
@@ -55,15 +55,20 @@ The system could not provide the required information
 (possibly because the
 .I /proc
 filesystem was not mounted).
-.SH CONFORMING TO
-These functions are GNU extensions.

man3/get_phys_pages.3 The system could not provide the required information · line 65

Quoted 10 lines
man3/get_phys_pages.3 +3 -2
-.SH NOTES
-These functions obtain the required information by scanning the
+.SH VERSIONS
+Before glibc 2.23,
+these functions obtained the required information by scanning the
 .I MemTotal
 and
 .I MemFree
 fields of
 .IR /proc/meminfo .

Thanks for the patch. But I think it would be better to put all the info into NOTES, rather than splitting some out into VERSIONS.

Quoted 2 lines
man3/get_phys_pages.3 +2 -0
+.SH CONFORMING TO
+These functions are GNU extensions.
Quoted 8 lines
Quoted 1 line

And it's good to add this, but let's make it a separate patch.

Hi Michael,

I didn't add that.
This is one of those times when git provides unreadable diffs. Please have a closer look at the diff,
and also at the rendered output.

Yes, I see now.

Still, it would be best to put this piece into NOTES:

Quoted 8 lines

[[
Before glibc 2.23,
these functions obtained the required information by scanning the .I MemTotal
Before glibc 2.23,
these functions obtained the required information by scanning the .I MemTotal
]]

Quoted 3 lines

Hi Michael,

I've seen you've applied the patch already; maybe by accident?

D'oh! Yes, it was an accident.

Quoted 2 lines

I don't know exactly how you prefer it, so maybe now you can move around the text to NOTES in a new commit.

Done.

Thanks,

Michael

Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/