All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	"Eric W. Biederman"
	<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
	menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	Sukadev Bhattiprolu
	<sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	akpm-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] cgroups: skip processes from other namespaces when listing a cgroup
Date: Mon, 08 Dec 2008 08:31:29 -0800	[thread overview]
Message-ID: <1228753889.9737.10.camel@nimitz> (raw)
In-Reply-To: <20081208151412.GN13333-SINUvgVNF2CyUtPGxGje5AC/G2K4zDHf@public.gmane.org>

On Mon, 2008-12-08 at 20:44 +0530, Balbir Singh wrote:
> * gowrishankar <gomuthuk-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> [2008-12-07 20:16:01]:
> >     struct cgroup_iter it;
> >     struct task_struct *tsk;
> >     cgroup_iter_start(cgrp, &it);
> >     while ((tsk = cgroup_iter_next(cgrp, &it))) {
> >         if (unlikely(n == npids))
> >             break;
> > -        pidarray[n++] = task_pid_vnr(tsk);
> > +        if ((vpid = task_pid_vnr(tsk)) > 0)
> > +            pidarray[n++] = vpid;
> >     }
> >     cgroup_iter_end(cgrp, &it);
> >     return n;

One more thing...

Please cc Eric and Suka on patches like this.  If we get many users like
this we'll probably want to add some common function.  Or if someone
missed using one, they can probably suggest one.

-- Dave

  parent reply	other threads:[~2008-12-08 16:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-07 14:46 [PATCH] cgroups: skip processes from other namespaces when listing a cgroup gowrishankar
     [not found] ` <493BE1A9.8030503-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-12-08 15:14   ` Balbir Singh
     [not found]     ` <20081208151412.GN13333-SINUvgVNF2CyUtPGxGje5AC/G2K4zDHf@public.gmane.org>
2008-12-08 16:31       ` Dave Hansen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-12-08  7:22 gowrishankar
     [not found] ` <493CCB28.7000005-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-12-09  0:19   ` Andrew Morton

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=1228753889.9737.10.camel@nimitz \
    --to=dave-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=akpm-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
    --cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@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.