From: jacob pan <jacob.jun.pan@linux.intel.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: container cgroup <containers@lists.linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Li Zefan <lizf@cn.fujitsu.com>, Paul Menage <menage@google.com>,
Arjan van de Ven <arjan@linux.intel.com>,
Matt Helsley <matthltc@us.ibm.com>
Subject: Re: [RFC PATCH 2/2] cgroup/freezer: add per freezer duty ratio control
Date: Wed, 2 Feb 2011 11:32:53 -0800 [thread overview]
Message-ID: <20110202113253.789a2a85@putvin> (raw)
In-Reply-To: <20110201142301.GA23803@shutemov.name>
On Tue, 1 Feb 2011 16:23:01 +0200
"Kirill A. Shutemov" <kirill@shutemov.name> wrote:
Thanks for your review, I will fix the error handling. Please also see
my comments on create vs populate.
> On Wed, Dec 01, 2010 at 11:00:12AM -0800,
> jacob.jun.pan@linux.intel.com wrote:
> > From: Jacob Pan <jacob.jun.pan@linux.intel.com>
>
> > +#define FREEZER_KH_PREFIX "freezer_"
> > static int freezer_populate(struct cgroup_subsys *ss, struct
> > cgroup *cgroup) {
> > + int ret = 0;
> > + char thread_name[32];
> > + struct freezer *freezer;
> > +
> > if (!cgroup->parent)
> > return 0;
> > - return cgroup_add_files(cgroup, ss, files,
> > ARRAY_SIZE(files)); +
> > + freezer = cgroup_freezer(cgroup);
> > + ret = cgroup_add_files(cgroup, ss, files,
> > ARRAY_SIZE(files)); +
> > + snprintf(thread_name, 32, "%s%s", FREEZER_KH_PREFIX,
> > + cgroup->dentry->d_name.name);
> > + freezer->fkh = kthread_run(freezer_kh, (void *)cgroup,
> > thread_name);
> > + if (!IS_ERR(freezer_task))
> > + return 0;
> > + return ret;
>
> Why do you create on freezer_populate, not on freezer_create?
I want to use the cgroup directory name for the kernel thread. If I do
that in create() instead of populate, I would have to add more changes:
1. pass dentry to the create function since that is called before
cgroup_create_dir()
2. skip the dummy root as part of the initialization.
So I chose to use populate, are there any issues with the functionality?
prev parent reply other threads:[~2011-02-02 19:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-01 19:00 [RFC PATCH 0/2] per cgroup timer slack and freezer duty cycle jacob.jun.pan
2010-12-01 19:00 ` [RFC PATCH 1/2] cgroup: add per cgroup timer_slack_ns jacob.jun.pan
2010-12-01 20:17 ` Paul Menage
2010-12-02 20:45 ` jacob pan
2010-12-02 20:52 ` Paul Menage
2010-12-02 22:06 ` jacob pan
2010-12-01 19:00 ` [RFC PATCH 2/2] cgroup/freezer: add per freezer duty ratio control jacob.jun.pan
2011-02-01 14:23 ` Kirill A. Shutemov
2011-02-02 19:32 ` jacob pan [this message]
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=20110202113253.789a2a85@putvin \
--to=jacob.jun.pan@linux.intel.com \
--cc=arjan@linux.intel.com \
--cc=containers@lists.linux-foundation.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=matthltc@us.ibm.com \
--cc=menage@google.com \
/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