All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Lennart Poettering <lennart-mdGvqq1h2p+GdvJs77BJ7Q@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Confusion regarding unit of RLIMIT_RSS
Date: Thu, 17 Dec 2015 08:17:56 +0100	[thread overview]
Message-ID: <567261A4.5060608@gmail.com> (raw)
In-Reply-To: <20151109160710.GA7322@gardel-login>

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

      reply	other threads:[~2015-12-17  7:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 16:07 Confusion regarding unit of RLIMIT_RSS Lennart Poettering
2015-12-17  7:17 ` Michael Kerrisk (man-pages) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=567261A4.5060608@gmail.com \
    --to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=lennart-mdGvqq1h2p+GdvJs77BJ7Q@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.