Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp983283img; Thu, 28 Feb 2019 11:00:32 -0800 (PST) X-Google-Smtp-Source: APXvYqwu4P1gDpv/BxE/d9+IvdLVsur/DIrsFlUSG3Da1FeOGcTgphXQcERl8NxKXNRZEfhvFqwt X-Received: by 2002:a17:902:8d97:: with SMTP id v23mr875131plo.274.1551380432660; Thu, 28 Feb 2019 11:00:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551380432; cv=none; d=google.com; s=arc-20160816; b=MOXOReo3mcYRZCbSix+0AV+SZDGputVcVdffVgsNTLSj7oZ89DaIIO/cGkbMiUzXSt +iD+qF+3Zvl9XLsgh2Ukw0A2uzsGTOaHgpiuZLg7Ot1f+jbvnqupgZRRZhRFMpNhGrEw 4RhTpYiubzEjN4Q5gueLUpG9vwDa2BvKGXrZSlTXgiZ+Su+ALvsDoirx9b2XtSvHsh3/ hwBfe4Z8ftvqEQugXl/6yldq2mBS/zk4JB4ZMfgVhEQKEdxDPy7XlWOSAxDIxBl38coN PDEZdnkvxmFegw4p+817MdS4kyhxKfD2xApUU+PUscS0spObEmkVLSO92e+A/ylP9jMO gekA== 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=nvys6cqsbzsc+PZdOjdU9Es3UHLp/VH5r8I31uymmQ8=; b=IB1N55FbwSXG41/0C2WAPLjgiu29rYBUhLfx7BNKPnAGK4NYWsV2zrxtl+Cy1EuCRF OM89Zo3tb1WRYwoNfmnHuqyLweiglXcYMoXdA+bSeFFRrDEEb2tNSJgeZtqBF5Zv5u7K ZIYw11hQtIDkTSTZakQKcL5r5qvNiISEHbFnbLcOgQUEdWgcvBSSroaLHicLTnIguKii yq+I8qC5EOfXvJfmbQCUdk1YH2tfyDe0xO/nfxK6ybBwknylrcafFBWG3ngPNWFhZ0hM DDnCGgaA93qDmHlnpGOcrYEJ6lAf8/QtdlWknYSwjr2OjuU9wuENxek9sH3l3ARgG9uV ppbg== 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 f76si18831333pfa.238.2019.02.28.11.00.17; Thu, 28 Feb 2019 11:00:32 -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 S2388248AbfB1Srk (ORCPT + 99 others); Thu, 28 Feb 2019 13:47:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38138 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbfB1Srk (ORCPT ); Thu, 28 Feb 2019 13:47:40 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 52BBBC07C563; Thu, 28 Feb 2019 18:47:39 +0000 (UTC) Received: from llong.com (ovpn-121-201.rdu2.redhat.com [10.10.121.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 221B019C5B; Thu, 28 Feb 2019 18:47:35 +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 v12 0/3] ipc: Increase IPCMNI limit Date: Thu, 28 Feb 2019 13:47:22 -0500 Message-Id: <1551379645-819-1-git-send-email-longman@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 28 Feb 2019 18:47:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v11->v12: - As suggested by Matthew, change patch 2 to increment sequence number when there is a wrap around in generated ID instead of after a ID deletion. 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. v9 patch: https://lkml.org/lkml/2018/9/7/1141 v10 patch: https://lkml.org/lkml/2018/11/5/791 v11 patch: https://lkml.org/lkml/2018/11/10/32 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 the generated id is not greater than the previous one. That reduces 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 | 27 ++++++++++----- ipc/util.h | 46 ++++++++++++++++++++----- 5 files changed, 76 insertions(+), 18 deletions(-) -- 1.8.3.1