All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 4/4] cgroup: reuse css->destroy_work for release agent
Date: Thu, 18 Sep 2014 06:37:34 +0900	[thread overview]
Message-ID: <20140917213734.GD15795@mtj.dyndns.org> (raw)
In-Reply-To: <5419606D.4070707-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

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-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
...
> @@ -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

WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj@kernel.org>
To: Li Zefan <lizefan@huawei.com>
Cc: cgroups <cgroups@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/4] cgroup: reuse css->destroy_work for release agent
Date: Thu, 18 Sep 2014 06:37:34 +0900	[thread overview]
Message-ID: <20140917213734.GD15795@mtj.dyndns.org> (raw)
In-Reply-To: <5419606D.4070707@huawei.com>

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@huawei.com>
...
> @@ -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

  parent reply	other threads:[~2014-09-17 21:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17 10:18 [PATCH 1/4] cgroup: remove some useless forward declarations Li Zefan
2014-09-17 10:18 ` Li Zefan
     [not found] ` <54195FE1.9030607-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-09-17 10:18   ` [PATCH 2/4] ccgroup: remove redundant code in cgroup_rmdir() Li Zefan
2014-09-17 10:18     ` Li Zefan
2014-09-17 10:19   ` [PATCH 3/4] cgroup: remove bogus comments Li Zefan
2014-09-17 10:19     ` Li Zefan
     [not found]     ` <5419602C.4080303-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-09-17 21:36       ` Tejun Heo
2014-09-17 21:36         ` Tejun Heo
2014-09-17 10:20   ` [PATCH 4/4] cgroup: reuse css->destroy_work for release agent Li Zefan
2014-09-17 10:20     ` Li Zefan
     [not found]     ` <5419606D.4070707-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-09-17 21:37       ` Tejun Heo [this message]
2014-09-17 21:37         ` Tejun Heo

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=20140917213734.GD15795@mtj.dyndns.org \
    --to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan-hv44wF8Li93QT0dZR+AlfA@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.