The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] oom_adj/oom_score documentation
       [not found]     ` <20060801134102.GA6455@opteron.random>
@ 2006-08-01 14:13       ` Jan-Frode Myklebust
  2006-08-01 15:37         ` Jan-Frode Myklebust
  2006-08-01 16:32         ` Randy.Dunlap
  0 siblings, 2 replies; 3+ messages in thread
From: Jan-Frode Myklebust @ 2006-08-01 14:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

I was looking for the a way around an OOM-problem, and found
a couple of undocumented new features for tuning the OOM-score
of individual processes. Here's a small documentation patch for
/proc/<pid>/oom_adj and /proc/<pid>/oom_score.

Signed-off-by: Jan-Frode Myklebust <mykleb@no.ibm.com>

---

diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 99902ae..81bb8ea 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -39,6 +39,8 @@ Table of Contents
   2.9	Appletalk
   2.10	IPX
   2.11	/proc/sys/fs/mqueue - POSIX message queues filesystem
+  2.12	/proc/<pid>/oom_adj - Adjust the oom-killer score
+  2.13	/proc/<pid>/oom_score - Display current oom-killer score
 
 ------------------------------------------------------------------------------
 Preface
@@ -1958,6 +1960,21 @@ a queue must be less or equal then msg_m
 maximum  message size value (it is every  message queue's attribute set during
 its creation).
 
+2.12 /proc/<pid>/oom_adj - Adjust the oom-killer score
+------------------------------------------------------
+
+This file can be used to adjust the score used to select which processes shall
+be killed in an out-of-memory situation.  Giving it a high score, increase the
+likelihood of this process being killed by the oom-killer. Valid values are in
+the range [-16:15], plus the special value '-17', which defeat the  oom-killer
+altogether.
+
+2.13 /proc/<pid>/oom_score - Display current oom-killer score
+-------------------------------------------------------------
+
+This file can be used to check what the  current score  used by the oom-killer
+is for any given <pid>. Use it together with /proc/<pid>/oom_adj to tune which
+process will be killed in an out-of-memory situation.
 
 ------------------------------------------------------------------------------
 Summary

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

* Re: [PATCH] oom_adj/oom_score documentation
  2006-08-01 14:13       ` [PATCH] oom_adj/oom_score documentation Jan-Frode Myklebust
@ 2006-08-01 15:37         ` Jan-Frode Myklebust
  2006-08-01 16:32         ` Randy.Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: Jan-Frode Myklebust @ 2006-08-01 15:37 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Alan Cox

Got some spelling/language advice from Alan Cox (thanks!), so here's 
an updated patch. Hope it reads better now.


Signed-off-by: Jan-Frode Myklebust <mykleb@no.ibm.com>
 
---

diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 99902ae..172098a 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -39,6 +39,8 @@ Table of Contents
   2.9	Appletalk
   2.10	IPX
   2.11	/proc/sys/fs/mqueue - POSIX message queues filesystem
+  2.12	/proc/<pid>/oom_adj - Adjust the oom-killer score
+  2.13	/proc/<pid>/oom_score - Display current oom-killer score
 
 ------------------------------------------------------------------------------
 Preface
@@ -1958,6 +1960,22 @@ a queue must be less or equal then msg_m
 maximum  message size value (it is every  message queue's attribute set during
 its creation).
 
+2.12 /proc/<pid>/oom_adj - Adjust the oom-killer score
+------------------------------------------------------
+
+This file can be used to adjust the score used to select which processes 
+should be killed in an  out-of-memory  situation.  Giving it a high score will 
+increase the likelihood of this process being killed by the oom-killer.  Valid
+values are in the range -16 to +15, plus the special value -17, which disables
+oom-killing altogether for this process.
+
+2.13 /proc/<pid>/oom_score - Display current oom-killer score
+-------------------------------------------------------------
+
+------------------------------------------------------------------------------
+This file can be used to check the current score used by the oom-killer is for
+any given <pid>. Use it together with /proc/<pid>/oom_adj to tune which
+process should be killed in an out-of-memory situation.
 
 ------------------------------------------------------------------------------
 Summary

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

* Re: [PATCH] oom_adj/oom_score documentation
  2006-08-01 14:13       ` [PATCH] oom_adj/oom_score documentation Jan-Frode Myklebust
  2006-08-01 15:37         ` Jan-Frode Myklebust
@ 2006-08-01 16:32         ` Randy.Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: Randy.Dunlap @ 2006-08-01 16:32 UTC (permalink / raw)
  To: Jan-Frode Myklebust; +Cc: akpm, linux-kernel

On Tue, 1 Aug 2006 16:13:08 +0200 Jan-Frode Myklebust wrote:

> I was looking for the a way around an OOM-problem, and found
> a couple of undocumented new features for tuning the OOM-score
> of individual processes. Here's a small documentation patch for
> /proc/<pid>/oom_adj and /proc/<pid>/oom_score.

Thanks, it's needed.

A few comments below.


> Signed-off-by: Jan-Frode Myklebust <mykleb@no.ibm.com>
> 
> ---
> 
> diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
> index 99902ae..81bb8ea 100644
> --- a/Documentation/filesystems/proc.txt
> +++ b/Documentation/filesystems/proc.txt
> @@ -39,6 +39,8 @@ Table of Contents
>    2.9	Appletalk
>    2.10	IPX
>    2.11	/proc/sys/fs/mqueue - POSIX message queues filesystem
> +  2.12	/proc/<pid>/oom_adj - Adjust the oom-killer score
> +  2.13	/proc/<pid>/oom_score - Display current oom-killer score
>  
>  ------------------------------------------------------------------------------
>  Preface
> @@ -1958,6 +1960,21 @@ a queue must be less or equal then msg_m
>  maximum  message size value (it is every  message queue's attribute set during
>  its creation).
>  
> +2.12 /proc/<pid>/oom_adj - Adjust the oom-killer score
> +------------------------------------------------------
> +
> +This file can be used to adjust the score used to select which processes shall
> +be killed in an out-of-memory situation.  Giving it a high score, increase the

Drop the comma.  "increases"

> +likelihood of this process being killed by the oom-killer. Valid values are in
> +the range [-16:15], plus the special value '-17', which defeat the  oom-killer

"defeats"

> +altogether.
> +
> +2.13 /proc/<pid>/oom_score - Display current oom-killer score
> +-------------------------------------------------------------
> +
> +This file can be used to check what the  current score  used by the oom-killer
> +is for any given <pid>. Use it together with /proc/<pid>/oom_adj to tune which
> +process will be killed in an out-of-memory situation.
>  
>  ------------------------------------------------------------------------------
>  Summary


---
~Randy

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

end of thread, other threads:[~2006-08-01 16:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <OFF927B0C7.8C7E4394-ONC12571BC.003A43D2-C12571BC.003B49E8@no.ibm.com>
     [not found] ` <20060731122314.GL6455@opteron.random>
     [not found]   ` <20060801133323.GA10128@99RXZYP.ibm.com>
     [not found]     ` <20060801134102.GA6455@opteron.random>
2006-08-01 14:13       ` [PATCH] oom_adj/oom_score documentation Jan-Frode Myklebust
2006-08-01 15:37         ` Jan-Frode Myklebust
2006-08-01 16:32         ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox