All of lore.kernel.org
 help / color / mirror / Atom feed
* Confusion regarding unit of RLIMIT_RSS
@ 2015-11-09 16:07 Lennart Poettering
  2015-12-17  7:17 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Lennart Poettering @ 2015-11-09 16:07 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

heya,

The man page for setrlimit() claims that RLIMIT_RSS is to be specified
in bytes, but glibc's bits/resources.h claims it was in bytes. My
suspicion is that the header is right, and the man page wrong. But of
course, since the limit has no effect on Linux anyway, maybe this is
not the most important thing to fix, but I thought I'd at least report
the discrepancy here...

Thanks,

Lennart
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Confusion regarding unit of RLIMIT_RSS
  2015-11-09 16:07 Confusion regarding unit of RLIMIT_RSS Lennart Poettering
@ 2015-12-17  7:17 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-12-17  7:17 UTC (permalink / raw)
  To: Lennart Poettering
  Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man-u79uwXL29TY76Z2rM5mHXA

Hi Lennart

On 11/09/2015 05:07 PM, Lennart Poettering wrote:
> heya,
> 
> The man page for setrlimit() claims that RLIMIT_RSS is to be specified
> in bytes, but glibc's bits/resources.h claims it was in bytes. 

I'm confused by that sentence. You have a "but", but both cases are
"bytes". What's the contradiction you are trying to point out?
Ahhh -- I get it now. The man page says "pages".

> My
> suspicion is that the header is right, and the man page wrong. But of
> course, since the limit has no effect on Linux anyway, maybe this is
> not the most important thing to fix, but I thought I'd at least report
> the discrepancy here...

The man page is clearly wrong. From bits/resources.h we have:

[[
  /* Largest resident set size, in bytes.   <=====
     This affects swapping; processes that are exceeding their
     resident set size will be more likely to have physical memory
     taken from them.  */
  __RLIMIT_RSS = 5,
#define RLIMIT_RSS __RLIMIT_RSS
]]

And in the kernel source file fs/proc/base.c, we have:

        [RLIMIT_RSS] = {"Max resident set", "bytes"},

As you note, the point is kind of moot, but the page should be fixed.
Done! 

Thanks for the report,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-12-17  7:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09 16:07 Confusion regarding unit of RLIMIT_RSS Lennart Poettering
2015-12-17  7:17 ` Michael Kerrisk (man-pages)

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.