Re: [PATCH 4/4] cgroup: reuse css->destroy_work for release agent
From: Tejun Heo
Date: Wed Sep 17 2014 - 17:37:45 EST
On Wed, Sep 17, 2014 at 06:20:29PM +0800, Li Zefan wrote:
> Currently we use a global work to schedule release agent on removable
> cgroups. We can change to reuse css->destroy_work to do this, which
> saves a few lines of code.
>
> Signed-off-by: Zefan Li <lizefan@xxxxxxxxxx>
...
> @@ -1587,6 +1581,7 @@ static void init_cgroup_housekeeping(struct cgroup *cgrp)
> INIT_LIST_HEAD(&cgrp->e_csets[ssid]);
>
> init_waitqueue_head(&cgrp->offline_waitq);
> + INIT_WORK(&cgrp->self.destroy_work, cgroup_release_agent);
It's weird to overload destroy_work like this as invoking
release_agent isn't necessarily related to destruction. I like the
change overall but can we please just use a separate work item?
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/