public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: sukadev@us.ibm.com
To: Andrew Morton <akpm@linux-foundation.org>
Cc: xemul@openvz.org, devel@openvz.org, linux-kernel@vger.kernel.org,
	containers@lists.osdl.org, oleg@tv-sign.ru
Subject: Re: [PATCH 5/20] Introduce struct upid
Date: Fri, 7 Sep 2007 19:16:56 -0700	[thread overview]
Message-ID: <20070908021656.GA21860@us.ibm.com> (raw)
In-Reply-To: <20070814130558.4b5e5e3f.akpm@linux-foundation.org>

Andrew Morton [akpm@linux-foundation.org] wrote:
| On Fri, 10 Aug 2007 15:47:59 +0400
| xemul@openvz.org wrote:
| 
| >  struct pid
| >  {
| >  	atomic_t count;
| > @@ -50,6 +50,8 @@ struct pid
| >  	/* lists of tasks that use this pid */
| >  	struct hlist_head tasks[PIDTYPE_MAX];
| >  	struct rcu_head rcu;
| > +	int level;
| > +	struct upid numbers[1];
| 
| You can make this have size [0] now.  It's a gcc extension and
| is used elsewhere in the kernel.

Sorry, we did not respond to this yet :-)

Well, every process has at least one 'struct upid'. The only "cost"
I see with size [1] is having to subtract 1 in create_pid_cachep().

Besides, we create/initialize the 'struct pid' for the idle process
by hand (see INIT_STRUCT_PID in init_task.h).

If we set this size to [0] now, we would need to dynamically allocate
a 'struct upid' during early boot and attach this upid to init_struct_pid.

Or is there a easy way to attach a 'upid' to init_struct_pid, statically ?

Suka


      reply	other threads:[~2007-09-08  2:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10 11:47 [PATCH 5/20] Introduce struct upid xemul
2007-08-14 20:05 ` Andrew Morton
2007-09-08  2:16   ` sukadev [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=20070908021656.GA21860@us.ibm.com \
    --to=sukadev@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.osdl.org \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --cc=xemul@openvz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox