mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Neil Horman <nhorman@tuxdriver.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	torvalds@linux-foundation.org
Subject: Re: [PATCH]: proc: export a processes resource limits via proc/<pid>
Date: Mon, 13 Aug 2007 12:47:38 -0400	[thread overview]
Message-ID: <10638.1187023658@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Mon, 13 Aug 2007 10:00:44 EDT." <20070813140044.GB1960@hmsreliant.think-freely.org>

[-- Attachment #1: Type: text/plain, Size: 1506 bytes --]

On Mon, 13 Aug 2007 10:00:44 EDT, Neil Horman said:
> Hey there-
> 	Currently, there exists no method for a process to query the resource
> limits of another process.  They can be inferred via some mechanisms but they
> cannot be explicitly determined.  Given that this information can be usefull to
> know during the debugging of an application, I've written this patch which
> exports all of a processes limits via /proc/<pid>/limits.  Tested successfully
> by myself on x86 on top of 2.6.23-rc2-mm1.

>  /************************************************************************/
>  /*                       Here the fs part begins                        */
>  /************************************************************************/
> @@ -2017,6 +2080,7 @@ static const struct pid_entry tgid_base_stuff[] = {
>  	INF("environ",    S_IRUSR, pid_environ),
>  	INF("auxv",       S_IRUSR, pid_auxv),
>  	INF("status",     S_IRUGO, pid_status),
> +	INF("limits",	  S_IRUGO, pid_limits),

Any takers for S_IRUSR instead?  Either that, or lay out the use case for
making it S_IRUGO.  (I'm OK on it being world-visible *if* there's a good
and sane reason for it)

>  #ifdef CONFIG_SCHED_DEBUG
>  	REG("sched",      S_IRUGO|S_IWUSR, pid_sched),
>  #endif
> @@ -2310,6 +2374,7 @@ static const struct pid_entry tid_base_stuff[] = {
>  	INF("environ",   S_IRUSR, pid_environ),
>  	INF("auxv",      S_IRUSR, pid_auxv),
>  	INF("status",    S_IRUGO, pid_status),
> +	INF("limits",	 S_IRUGO, pid_limits),

Here too.

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

  parent reply	other threads:[~2007-08-13 17:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13 14:00 Neil Horman
2007-08-13 15:47 ` Arjan van de Ven
2007-08-13 16:47 ` Valdis.Kletnieks [this message]
2007-08-13 17:26   ` Neil Horman
2007-08-13 19:25 ` Ingo Oeser
2007-08-13 20:11   ` Neil Horman
2007-08-13 21:04     ` Alexey Dobriyan
2007-08-13 23:58       ` Neil Horman
2007-08-16 12:35 ` Neil Horman
2007-08-17  8:09   ` Valdis.Kletnieks
2007-08-17 10:59     ` Neil Horman
2007-08-17 19:45       ` Andrew Morton
2007-08-17 20:20         ` Valdis.Kletnieks
2007-08-17 21:00         ` Neil Horman
2007-08-21 18:56         ` Andy Isaacson
2007-08-23  2:40           ` Matt Mackall
2007-08-23 10:53             ` Neil Horman

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=10638.1187023658@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=torvalds@linux-foundation.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®