public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Paul Menage <menage@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux Containers <containers@lists.linux-foundation.org>
Subject: Re: [PATCH 3/3] cgroups: introduce link_css_set() to remove duplicate code
Date: Tue, 02 Dec 2008 11:18:19 +0800	[thread overview]
Message-ID: <4934A8FB.80904@cn.fujitsu.com> (raw)
In-Reply-To: <6599ad830812011620ld861aabgc70846a07ce1d487@mail.gmail.com>

Paul Menage wrote:
> On Fri, Nov 28, 2008 at 2:02 AM, Li Zefan <lizf@cn.fujitsu.com> wrote:
>> Add a common function link_css_set() to link a css_set to a cgroup.
>>
>> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> 
> Overall the change looks like an improvement, but:
> 
> - the new function could do with comments about the semantics of its
> parameters, particularly tmp_cg_links.

How about:

/**
 * link_css_set - a helper function to link a css_set to a cgroup
 * @ tmp_cg_links: cg_cgroup_link objects allocated by allocate_cg_links()
 * @ cg: the css_set to be linked
 * @ cgrp: the destination cgroup
 */
static void link_css_set(struct list_head *tmp_cg_links,
			 struct css_set *cg, struct cgroup *cgrp)

> - why are you renaming cgrp -> root_cgrp in cgroup_get_sb()? That
> seems like unnecessary churn.
> 

Because we are linking all the css_sets to the root cgroup, so I think root_cgrp
helps readability.


  reply	other threads:[~2008-12-02  3:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28 10:02 [PATCH 3/3] cgroups: introduce link_css_set() to remove duplicate code Li Zefan
2008-12-02  0:20 ` Paul Menage
2008-12-02  3:18   ` Li Zefan [this message]
2008-12-02 22:16     ` Paul Menage

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=4934A8FB.80904@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --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