Skip to contentSkip to conversation

proc(5): minor text updates

DISCUSSION Tolga Dalman 2 participants 6 messages Aug 6, 2012 – Aug 14, 2012 5 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

Hi,

while reading the /proc/[pid]/stat part in proc(5), I noticed two minor issues that should be fixed:

1. The text reads:
"flags %u (%lu before Linux 2.6.22) kernel flags word of the process.
For bit meanings, see the PF_* defines in <linux/sched.h>."

PF_* is obvisously wrong. It should be CLONE_*.

2. There is a wrong reference further below:
"rsslim %lu Current soft limit in bytes on the rss of the
process; see the description of RLIMIT_RSS in getpriority(2)."

The correct page is getrlimit(2).

Thanks!

Best regards
Tolga Dalman

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 50202153.6030808-gM/[email protected]

#2 lore raw

Hello Tolga,

Quoted 10 lines · Tolga Dalman

Hi,

while reading the /proc/[pid]/stat part in proc(5), I noticed two minor issues that should be fixed:

1. The text reads:
"flags %u (%lu before Linux 2.6.22) kernel flags word of the process.
For bit meanings, see the PF_* defines in <linux/sched.h>."

PF_* is obvisously wrong. It should be CLONE_*.

I haven't looked closely, but I think PF_* is correct. Why do you think it's wrong?

Quoted 5 lines

2. There is a wrong reference further below:
"rsslim %lu Current soft limit in bytes on the rss of the
process; see the description of RLIMIT_RSS in getpriority(2)."

The correct page is getrlimit(2).

Yes. Thanks for that. Fixed now.

Cheers,

Michael

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): CAKgNAkhrmpZuF45iOA52akABSm4hUy4ygR=vEg4XQ_4Ri7DjRw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw

Hi Michael,

Quoted 11 lines · Michael Kerrisk (man-pages)
Quoted 8 lines

while reading the /proc/[pid]/stat part in proc(5), I noticed two minor issues that should be fixed:

1. The text reads: "flags %u (%lu before Linux 2.6.22) kernel flags word of the process. For bit meanings, see the PF_* defines in <linux/sched.h>."

PF_* is obvisously wrong. It should be CLONE_*.

I haven't looked closely, but I think PF_* is correct. Why do you think it's wrong?

To my understanding, flags contains process flags (i.e., CLONE_*), which are defined in <linux/sched.h>. PF_* flags, on the other hand, specify protocol flags. Those are not related to <linux/sched.h> at all, but defined in <bits/socket.h>

Best regards
Tolga Dalman

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 502935C1.60901-gM/[email protected]

#6 lore raw

Hi Tolga,

Quoted 12 lines · Tolga Dalman

Hi Michael,

Quoted 9 lines · Michael Kerrisk (man-pages)
Quoted 8 lines

while reading the /proc/[pid]/stat part in proc(5), I noticed two minor issues that should be fixed:

1. The text reads: "flags %u (%lu before Linux 2.6.22) kernel flags word of the process. For bit meanings, see the PF_* defines in <linux/sched.h>."

PF_* is obvisously wrong. It should be CLONE_*.

Quoted 7 lines
Quoted 2 lines

I haven't looked closely, but I think PF_* is correct. Why do you think it's wrong?

To my understanding, flags contains process flags (i.e., CLONE_*), which are defined in <linux/sched.h>. PF_* flags, on the other hand, specify protocol flags. Those are not related to <linux/sched.h> at all, but defined in <bits/socket.h>

Ahh -- yes, an easy mistake to make I think. The thing is there are two unrelated sets of constants in the PF_* namespace. Take a look in linux/sched.h to see the other set, which is (AFAICS) the set that is used in this /proc file.

Cheers,

Michael

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): CAKgNAkh_PxqPy+jK0t6WG54KQXOkm2JBTDw69qEtqOsaeTVGAg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#8 lore raw

Hello Michael,

Quoted 4 lines · Michael Kerrisk (man-pages)

Ahh -- yes, an easy mistake to make I think. The thing is there are two unrelated sets of constants in the PF_* namespace. Take a look in linux/sched.h to see the other set, which is (AFAICS) the set that is used in this /proc file.

Which other set of PF_ constants in <linux/sched.h> ? I only see SCHED_* and CLONE_* defined in that file. Aside from protocol family PF_* flags, there is only <linux/elf.h> defining permission flags (PF_R/W/X), which seems unlikely to me.

Best regards
Tolga Dalman

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 502A90A9.1030100-gM/[email protected]

#10 lore raw

Hi Tolga,

Quoted 8 lines · Tolga Dalman

Hello Michael,

Quoted 4 lines · Michael Kerrisk (man-pages)

Ahh -- yes, an easy mistake to make I think. The thing is there are two unrelated sets of constants in the PF_* namespace. Take a look in linux/sched.h to see the other set, which is (AFAICS) the set that is used in this /proc file.

Quoted 4 lines

Which other set of PF_ constants in <linux/sched.h> ? I only see SCHED_* and CLONE_* defined in that file. Aside from protocol family PF_* flags, there is only <linux/elf.h> defining permission flags (PF_R/W/X), which seems unlikely to me.

Ahhh -- sorry, I should have been a little clearer: what the page is referring to is the kernel source file include/linux/sched.h. In that file there are the definitions below. I'll amend the wording of the page a little to make this clearer:

man5/proc.5 +2 -2
@@ -702,8 +702,8 @@ terminal of the process.
 \fIflags\fP %u (%lu before Linux 2.6.22)
 The kernel flags word of the process.
 For bit meanings,
-see the PF_* defines in
-.IR <linux/sched.h> .
+see the PF_* defines in the kernel source file
+.IR include/linux/sched.h .
 Details depend on the kernel version.
 .TP
 \fIminflt\fP %lu

Hopefully that helps.

Cheers

Michael

/*
* Per process flags
*/

#define PF_EXITING      0x00000004      /* getting shut down */
#define PF_EXITPIDONE   0x00000008      /* pi exit done on shut down */
#define PF_VCPU         0x00000010      /* I'm a virtual CPU */
#define PF_WQ_WORKER    0x00000020      /* I'm a workqueue worker */
#define PF_FORKNOEXEC   0x00000040      /* forked but didn't exec */
#define PF_MCE_PROCESS  0x00000080      /* process policy on mce errors */
#define PF_SUPERPRIV    0x00000100      /* used super-user privileges */
#define PF_DUMPCORE     0x00000200      /* dumped core */
#define PF_SIGNALED     0x00000400      /* killed by a signal */
#define PF_MEMALLOC     0x00000800      /* Allocating memory */
#define PF_NPROC_EXCEEDED 0x00001000    /* set_user noticed that
RLIMIT_NPROC was exceeded */
#define PF_USED_MATH    0x00002000      /* if unset the fpu must be
initialized before use */
#define PF_NOFREEZE     0x00008000      /* this thread should not be frozen */
#define PF_FROZEN       0x00010000      /* frozen for system suspend */
#define PF_FSTRANS      0x00020000      /* inside a filesystem transaction */
#define PF_KSWAPD       0x00040000      /* I am kswapd */
#define PF_LESS_THROTTLE 0x00100000     /* Throttle me less: I clean memory */
#define PF_KTHREAD      0x00200000      /* I am a kernel thread */
#define PF_RANDOMIZE    0x00400000      /* randomize virtual address space */
#define PF_SWAPWRITE    0x00800000      /* Allowed to write to swap */
#define PF_SPREAD_PAGE  0x01000000      /* Spread page cache over cpuset */
#define PF_SPREAD_SLAB  0x02000000      /* Spread some slab caches
over cpuset */
#define PF_THREAD_BOUND 0x04000000      /* Thread bound to specific cpu */
#define PF_MCE_EARLY    0x08000000      /* Early kill for mce process policy */
#define PF_MEMPOLICY    0x10000000      /* Non-default NUMA mempolicy */
#define PF_MUTEX_TESTER 0x20000000      /* Thread belongs to the rt

mutex tester */
#define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it
as freezable */

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html