linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <clameter@sgi.com>,
	linux-mm@kvack.org
Subject: Re: [patch -mm 7/5] oom: filter tasklist dump by mem_cgroup
Date: Tue, 25 Sep 2007 12:18:44 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.0.9999.0709251208580.20644@chino.kir.corp.google.com> (raw)
In-Reply-To: <46F949DC.1070806@linux.vnet.ibm.com>

On Tue, 25 Sep 2007, Balbir Singh wrote:

> > If an OOM was triggered as a result a cgroup's memory controller, the
> > tasklist shall be filtered to exclude tasks that are not a member of the
> > same group.
> > 
> > Creates a helper function to return non-zero if a task is a member of a
> > mem_cgroup:
> > 
> > 	int task_in_mem_cgroup(const struct task_struct *task,
> > 			       const struct mem_cgroup *mem);
> > 
> > Cc: Christoph Lameter <clameter@sgi.com>
> > Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> > Signed-off-by: David Rientjes <rientjes@google.com>
> 
> Thanks for doing this. The number of parameters to OOM kill
> have grown, may at the time of the next addition of parameter,
> we should consider using a structure similar to scan_control
> and pass the structure instead of all the parameters.
> 

I mentioned in the description of patch #5 in this set that the kernel 
will probably eventually want a generic tasklist dumping interface that 
allows users to specify what they want displayed for each task, even 
though that's going to introduce a large number of new flags like 
DUMP_PID, DUMP_TOTAL_VM_SIZE, etc.

It would be trivial to include a callback function to do the filtering for 
such a tasklist dumping interface that returns non-zero to display a task 
and zero otherwise.

So now our interface prototype looks like this:

	void dump_tasks(int (*filter)(const struct task_struct *),
		        unsigned long flags)

That's simple enough, but the work in converting other tasklist dumps over 
to using this interface and the number of flags this mechanism would 
require may not be so popular.  But, I agree, it's something that the 
kernel should have.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2007-09-25 19:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25 17:13 [patch -mm 6/5] memcontrol: move mm_cgroup to header file David Rientjes
2007-09-25 17:13 ` [patch -mm 7/5] oom: filter tasklist dump by mem_cgroup David Rientjes
2007-09-25 17:48   ` Balbir Singh
2007-09-25 19:18     ` David Rientjes [this message]
2007-09-25 18:00   ` Paul Menage
2007-09-25 21:17     ` Christoph Lameter
2007-09-25 22:54       ` Paul Menage
2007-09-26  1:14     ` Paul Jackson
2007-09-26  1:20       ` David Rientjes
2007-09-26  3:56         ` Paul Jackson
2007-09-26  4:14           ` David Rientjes
2007-09-26  4:24             ` David Rientjes
2007-09-26  4:37             ` Paul Jackson
2007-09-26  1:22       ` Paul Menage
2007-09-26  3:57         ` Paul Jackson
2007-09-26  4:03           ` Paul Menage
2007-09-26  4:30             ` Paul Jackson
2007-09-25 17:18 ` [patch -mm 6/5] memcontrol: move mm_cgroup to header file Balbir Singh
2007-09-25 18:49   ` David Rientjes

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=alpine.DEB.0.9999.0709251208580.20644@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=clameter@sgi.com \
    --cc=linux-mm@kvack.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