mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Clifford Wolf <clifford@clifford.at>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Add rlimits to /proc/<PID>/status
Date: Fri, 30 May 2008 23:46:22 +0200	[thread overview]
Message-ID: <1212183982.24826.55.camel@lappy.programming.kicks-ass.net> (raw)
In-Reply-To: <20080530201104.GG1369@clifford.at>

On Fri, 2008-05-30 at 22:11 +0200, Clifford Wolf wrote:
> Signed-off-by: Clifford Wolf <clifford@clifford.at>
> ---
>  fs/proc/array.c |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 57 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/proc/array.c b/fs/proc/array.c
> index 9e3b8c3..3cb2ad3 100644
> --- a/fs/proc/array.c
> +++ b/fs/proc/array.c
> @@ -242,6 +242,62 @@ static void collect_sigign_sigcatch(struct task_struct *p, sigset_t *ign,
>  	}
>  }
>  
> +static const char *rlim_names[RLIM_NLIMITS] = {
> +	[RLIMIT_CPU]        = "CPU",
> +	[RLIMIT_FSIZE]      = "FSize",
> +	[RLIMIT_DATA]       = "Data",
> +	[RLIMIT_STACK]      = "Stack",
> +	[RLIMIT_CORE]       = "Core",
> +	[RLIMIT_RSS]        = "RSS",
> +	[RLIMIT_NPROC]      = "NProc",
> +	[RLIMIT_NOFILE]     = "NoFile",
> +	[RLIMIT_MEMLOCK]    = "MemLock",
> +	[RLIMIT_AS]         = "AddrSpace",
> +	[RLIMIT_LOCKS]      = "Locks",
> +	[RLIMIT_SIGPENDING] = "SigPending",
> +	[RLIMIT_MSGQUEUE]   = "MsgQueue",
> +	[RLIMIT_NICE]       = "Nice",
> +	[RLIMIT_RTPRIO]     = "RTPrio",
> +	[RLIMIT_RTTIME]     = "RTTime"
> +};

fs/proc/base.c already has an array with strings in it


      parent reply	other threads:[~2008-05-30 21:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 20:11 Clifford Wolf
2008-05-30 21:35 ` Hugh Dickins
2008-05-30 22:50   ` Clifford Wolf
2008-05-30 21:46 ` Peter Zijlstra [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=1212183982.24826.55.camel@lappy.programming.kicks-ass.net \
    --to=a.p.zijlstra@chello.nl \
    --cc=clifford@clifford.at \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®