Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1178048imu; Fri, 9 Nov 2018 12:12:33 -0800 (PST) X-Google-Smtp-Source: AJdET5fG4OitfUxiY+jKhOIZ53S4mQEIuvRrks2EcQUbXsm6AE7/8B8K1nl24t15BSukwaspbTxO X-Received: by 2002:a63:b105:: with SMTP id r5mr8766699pgf.442.1541794353442; Fri, 09 Nov 2018 12:12:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541794353; cv=none; d=google.com; s=arc-20160816; b=ZUMO2NNI2WCoLQpsElm8FEWvcmNWGAZKbd4XL+hB/MIsPyfWcruyRBXaY7DmWAW/hQ P3KKd253/NBcxLVJvOsO0trrxsr/laRBJaQwrBShBhmbqSRBTCchpb0Ysb+v3QexEh5w GMH2TVuDrXx0IH1spwYkoZYXacVXR/tbTq6MeA31PDe8Dg7Nke0AmAQlBpFQo8r9rF71 IIj2h2ydTnj+Uj6fOlByJxZRpKR4Jwh0RhKGHjOttAVWG+du+X1UFmOA78rurPyXD2T1 Pd1Uqn4fU0sSXHNfoX+9JCXiwhby1pOCJSW68VWuk/f75cdrhmPwP3xn9Q5osI9/n1WS /HyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=1bhHoLjgIgvY6YSnC18UDCz/akvTAT74VtGcxWvgeHo=; b=uacW0WxWV3GoTdBAtbb0eWDQ7s2HFIwHmvWGsBEqlEWB1g7PUc4Q1vAL7MWs/AJTaI EQ2qPx9ymnJOdn7X4NYnhf7IgkamUv3oPqVJoWQ6hgvfIIPG0SnGNVq/M29eRCkDpDNN ZwNRNJYtN0+QA7UgAmMwDMDf9NikPW/RzhDcmDWnLpqT5dSP27vIGslpxyv7cLlNMbJE 64UnafcrW826cICq4qERyxSAjBZBHrPXnGOylzV/UAof+LEhHY4cX+utpkeD/zZi5rPW 7oirRGpAD1HFbGzwwiQ0lapLkfilfhZ8uqy7LSuFbqvu+ruIjwW8OvVko8RMX0pZV0A8 LqjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y196-v6si9561768pfc.231.2018.11.09.12.12.16; Fri, 09 Nov 2018 12:12:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728024AbeKJFx4 (ORCPT + 99 others); Sat, 10 Nov 2018 00:53:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46462 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725872AbeKJFx4 (ORCPT ); Sat, 10 Nov 2018 00:53:56 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD9FA3002061; Fri, 9 Nov 2018 20:11:48 +0000 (UTC) Received: from llong.com (dhcp-17-55.bos.redhat.com [10.18.17.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9CD9A6B8C8; Fri, 9 Nov 2018 20:11:44 +0000 (UTC) From: Waiman Long To: "Luis R. Rodriguez" , Kees Cook , Andrew Morton , Jonathan Corbet Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, Al Viro , Matthew Wilcox , "Eric W. Biederman" , Takashi Iwai , Davidlohr Bueso , Manfred Spraul , Waiman Long Subject: [PATCH v11 0/3] ipc: Increase IPCMNI limit & IPC id generation modes Date: Fri, 9 Nov 2018 15:11:29 -0500 Message-Id: <1541794292-19425-1-git-send-email-longman@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 09 Nov 2018 20:11:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v10->v11: - Remove the sysctl parameter. Now delete mode is the only way the sequence number is updated. The only choice users had to make is whether they need to specify ipcmni_extend in the boot command line or not. - Cyclical id allocation is enabled only in the ipcmni_extend mode. - Increase max # of ids in ipcmni_extend mode to 16M. v8 patch: https://lkml.org/lkml/2018/6/18/706 v9 patch: https://lkml.org/lkml/2018/9/7/1141 v10 patch: https://lkml.org/lkml/2018/11/5/791 There are users out there requesting increase in the IPCMNI value to more than 32k. This patchset does that by using a boot kernel parameter "ipcmni_extend" to increase the IPCMNI limit from 32k to 16M when that boot command line option is specified. Patch 1 adds a "ipcmni_extend" boot command line parameter to extend the IPCMNI limit from 32k to 16M. Patch 2 changes how the sequence number within an id is being generated by incrementing it only when one or more ids are deleted previously to reduce the chance of id reuse whether "ipcmni_extend" is set or not. Patch 3 makes identifier allocation go cyclical through the entire 24-bit id space with "ipcmni_extend" only to further reduce the chance of id reuse, but probably with a slight memory and performance overhead. The cyclical id allocation isn't done for non-ipcmni_extend mode as the potential memory and performance overhead may be problematic on system with slow CPU and little memory. Systems that run applications which need more than 32k IPC identifiers can certainly afford the extra overhead. Waiman Long (3): ipc: Allow boot time extension of IPCMNI from 32k to 16M ipc: Conserve sequence numbers in ipcmni_extend mode ipc: Do cyclic id allocation with ipcmni_extend mode Documentation/admin-guide/kernel-parameters.txt | 6 ++++ include/linux/ipc_namespace.h | 1 + ipc/ipc_sysctl.c | 14 +++++++- ipc/util.c | 32 ++++++++++++----- ipc/util.h | 46 ++++++++++++++++++++----- 5 files changed, 80 insertions(+), 19 deletions(-) -- 1.8.3.1