All of lore.kernel.org
 help / color / mirror / Atom feed
From: sukadev@us.ibm.com
To: Pavel Emelyanov <xemul@openvz.org>
Cc: Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	devel@openvz.org, Matt Mackall <mpm@selenic.com>
Subject: Re: [PATCH 0/3] Make tasks always have non-zero pids
Date: Thu, 4 Oct 2007 22:53:17 -0700	[thread overview]
Message-ID: <20071005055317.GB28111@us.ibm.com> (raw)
In-Reply-To: <4703A44F.9020402@openvz.org>

Pavel Emelianov [xemul@openvz.org] wrote:
| Some time ago Sukadev noticed that the vmlinux size has

Cedric pointed it out to me first :-)

| grown 5Kb due to merged pid namespaces. One of the big
| problems with it was fat inline functions. The other thing
| was noticed by Matt - the checks for task's pid to be not
| NULL take place and make the kernel grow due to inlining,
| but these checks are not always needed.
| 
| In this series I introduce a static pid (dummy), according
| to Matt's proposal, which is assigned to tasks during the 
| detach_pid and transfer_pid instead of NULL. This pid lives 
| in the init pid namespace and has the id = 0, so all the 
| task_xid_xnr() calls will still return 0 on a dead task.
| 
| Places that get the struct pid from task either get it from
| the current (in this case they will never get this dummy),
| or use it to compare with some other value (so they will 
| work the same for both NULL and dummy pids).
| 
| This saves up to 340 bytes for i386 kernel with minimal 
| config  and probably more with more users of pids.
| 
| Tested on i386 and x86_64 boxes. Tasks still live and die,
| namespaces and proc still work.
| 
| Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Acked-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>

      parent reply	other threads:[~2007-10-05  5:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-03 14:16 [PATCH 0/3] Make tasks always have non-zero pids Pavel Emelyanov
2007-10-03 14:19 ` [PATCH 1/3] Introduce the dummy_pid Pavel Emelyanov
2007-10-03 18:06   ` Randy Dunlap
2007-10-04  8:56     ` Pavel Emelyanov
2007-10-03 14:20 ` [PATCH 2/3] Prepare pid_nr() etc functions to work with not-NULL pids Pavel Emelyanov
2007-10-03 16:42   ` Matt Mackall
2007-10-04  8:54     ` Pavel Emelyanov
2007-10-04 17:13       ` Matt Mackall
2007-10-05 13:16         ` Pavel Emelyanov
2007-10-03 14:23 ` [PATCH 3/3] Use the __pid_nr() calls where appropriate Pavel Emelyanov
2007-10-05  5:53 ` 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=20071005055317.GB28111@us.ibm.com \
    --to=sukadev@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --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 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.