Hey, Li.
On Mon, Apr 15, 2013 at 11:49:57AM +0800, Li Zefan wrote:
> But if id is invalid, idr_find() will return NULL. As long as root is not
> NULL,
> task_cgroup_from_root() will always return a valid cgroup.
I'm hopping across multiple devel branches quickly today and somewhat
tipsy. Sorry
On 2013/4/15 11:46, Tejun Heo wrote:
> On Mon, Apr 15, 2013 at 11:43:15AM +0800, Li Zefan wrote:
>>> +int task_cgroup_path_from_hierarchy(struct task_struct *task, int
>>> hierarchy_id,
>>> + char *buf, size_t buflen)
>>> +{
>>> + struct cgroupfs_root *root;
>>> +
On Sun, Apr 14, 2013 at 08:46:13PM -0700, Tejun Heo wrote:
> On Mon, Apr 15, 2013 at 11:43:15AM +0800, Li Zefan wrote:
> > > +int task_cgroup_path_from_hierarchy(struct task_struct *task, int
> > > hierarchy_id,
> > > + char *buf, size_t buflen)
> > > +{
> > > + struct
On Mon, Apr 15, 2013 at 11:43:15AM +0800, Li Zefan wrote:
> > +int task_cgroup_path_from_hierarchy(struct task_struct *task, int
> > hierarchy_id,
> > + char *buf, size_t buflen)
> > +{
> > + struct cgroupfs_root *root;
> > + struct cgroup *cgrp = NULL;
> > +
> +int task_cgroup_path_from_hierarchy(struct task_struct *task, int
> hierarchy_id,
> + char *buf, size_t buflen)
> +{
> + struct cgroupfs_root *root;
> + struct cgroup *cgrp = NULL;
> + int ret = -ENOENT;
> +
> + mutex_lock(_mutex);
> +
> +
On Sun, Apr 14, 2013 at 11:36:59AM -0700, Tejun Heo wrote:
> kdbus folks want a sane way to determine the cgroup path that a given
> task belongs to on a given hierarchy, which is a reasonble thing to
> expect from cgroup core.
>
> Implement task_cgroup_path_from_hierarchy().
>
> Signed-off-by:
kdbus folks want a sane way to determine the cgroup path that a given
task belongs to on a given hierarchy, which is a reasonble thing to
expect from cgroup core.
Implement task_cgroup_path_from_hierarchy().
Signed-off-by: Tejun Heo
Cc: Kay Sievers
Cc: Greg Kroah-Hartman
Cc: Lennart
+int task_cgroup_path_from_hierarchy(struct task_struct *task, int
hierarchy_id,
+ char *buf, size_t buflen)
+{
+ struct cgroupfs_root *root;
+ struct cgroup *cgrp = NULL;
+ int ret = -ENOENT;
+
+ mutex_lock(cgroup_mutex);
+
+ root =
On Mon, Apr 15, 2013 at 11:43:15AM +0800, Li Zefan wrote:
+int task_cgroup_path_from_hierarchy(struct task_struct *task, int
hierarchy_id,
+ char *buf, size_t buflen)
+{
+ struct cgroupfs_root *root;
+ struct cgroup *cgrp = NULL;
+ int ret =
On Sun, Apr 14, 2013 at 08:46:13PM -0700, Tejun Heo wrote:
On Mon, Apr 15, 2013 at 11:43:15AM +0800, Li Zefan wrote:
+int task_cgroup_path_from_hierarchy(struct task_struct *task, int
hierarchy_id,
+ char *buf, size_t buflen)
+{
+ struct cgroupfs_root
On 2013/4/15 11:46, Tejun Heo wrote:
On Mon, Apr 15, 2013 at 11:43:15AM +0800, Li Zefan wrote:
+int task_cgroup_path_from_hierarchy(struct task_struct *task, int
hierarchy_id,
+ char *buf, size_t buflen)
+{
+ struct cgroupfs_root *root;
+ struct cgroup
Hey, Li.
On Mon, Apr 15, 2013 at 11:49:57AM +0800, Li Zefan wrote:
But if id is invalid, idr_find() will return NULL. As long as root is not
NULL,
task_cgroup_from_root() will always return a valid cgroup.
I'm hopping across multiple devel branches quickly today and somewhat
tipsy. Sorry
kdbus folks want a sane way to determine the cgroup path that a given
task belongs to on a given hierarchy, which is a reasonble thing to
expect from cgroup core.
Implement task_cgroup_path_from_hierarchy().
Signed-off-by: Tejun Heo t...@kernel.org
Cc: Kay Sievers k...@vrfy.org
Cc: Greg
On Sun, Apr 14, 2013 at 11:36:59AM -0700, Tejun Heo wrote:
kdbus folks want a sane way to determine the cgroup path that a given
task belongs to on a given hierarchy, which is a reasonble thing to
expect from cgroup core.
Implement task_cgroup_path_from_hierarchy().
Signed-off-by: Tejun
14 matches
Mail list logo