From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754601AbbI3VKL (ORCPT ); Wed, 30 Sep 2015 17:10:11 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:50342 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754479AbbI3VKI (ORCPT ); Wed, 30 Sep 2015 17:10:08 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Rasmus Villemoes Cc: Oleg Nesterov , linux-kernel@vger.kernel.org, Linux Containers References: <1443646163-31316-1-git-send-email-linux@rasmusvillemoes.dk> Date: Wed, 30 Sep 2015 16:00:51 -0500 In-Reply-To: <1443646163-31316-1-git-send-email-linux@rasmusvillemoes.dk> (Rasmus Villemoes's message of "Wed, 30 Sep 2015 22:49:19 +0200") Message-ID: <87zj03ei64.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-AID: U2FsdGVkX1+bUEj7TQB7+ak6gsG97zLqZd8KhNuBCg8= X-SA-Exim-Connect-IP: 67.3.201.231 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4545] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa01 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa01 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Rasmus Villemoes X-Spam-Relay-Country: X-Spam-Timing: total 442 ms - load_scoreonly_sql: 0.05 (0.0%), signal_user_changed: 3.9 (0.9%), b_tie_ro: 2.6 (0.6%), parse: 1.15 (0.3%), extract_message_metadata: 25 (5.6%), get_uri_detail_list: 1.71 (0.4%), tests_pri_-1000: 6 (1.3%), tests_pri_-950: 2.2 (0.5%), tests_pri_-900: 1.63 (0.4%), tests_pri_-400: 26 (5.8%), check_bayes: 24 (5.4%), b_tokenize: 9 (1.9%), b_tok_get_all: 6 (1.4%), b_comp_prob: 3.3 (0.7%), b_tok_touch_all: 2.4 (0.5%), b_finish: 0.98 (0.2%), tests_pri_0: 364 (82.4%), tests_pri_500: 7 (1.6%), rewrite_mail: 0.00 (0.0%) Subject: Re: [RFC 0/4] reduce pid_namespace footprint when not configured X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rasmus Villemoes writes: > A few suggestions for reducing the footprint of pid namespaces when > CONFIG_PID_NS=n. The savings are admittedly not huge: > > $ scripts/bloat-o-meter /tmp/vmlinux.master vmlinux > add/remove: 0/7 grow/shrink: 30/25 up/down: 368/-1032 (-664) #ifdefs in C files. More code to maintain. Very minor savings. I don't think it is worth the pain. If anything I would prefer to remove CONFIG_PID_NS. The CONFIG_PID_NS ifdef really is about keeping from exposing people to the feature tha don't use it more than it is about size reduction. Or do you have a case where this makes the difference between a usable kernel and a kernel that is not? Eric > Rasmus Villemoes (4): > pid_namespace: remove ->level and ->parent for !CONFIG_PID_NS > pid_namespace: remove .kref field for !CONFIG_PID_NS > pid_namespace: make pid_nr_ns and pid_vnr static inlines for > !CONFIG_PID_NS > pid_namespace: disable_pid_allocation is unused for !CONFIG_PID_NS > > include/linux/pid.h | 11 +++++++++++ > include/linux/pid_namespace.h | 20 ++++++++++++++++++++ > kernel/acct.c | 4 ++-- > kernel/pid.c | 24 +++++++++++++++--------- > 4 files changed, 48 insertions(+), 11 deletions(-)