Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1616401imm; Tue, 2 Oct 2018 11:02:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV61B47TfSHoNTwbTuO/OH7ghKGYyRa0v/xrmwRivV2tRnnuDu7CkxjAFSCc8Unnuo0vPWhpf X-Received: by 2002:a17:902:be14:: with SMTP id r20-v6mr16248396pls.293.1538503365052; Tue, 02 Oct 2018 11:02:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538503365; cv=none; d=google.com; s=arc-20160816; b=VExWMO5GHOsy9TTLyIPyV2bJ719RNFXrUF+Jv1lSFz4ZvgJanHrT5cGMJxKU6oNWYe yOjvfHFkDAzuU7ZC9odYGnqpCGwwba2Op7GBw2PlttJloGTIScT1vPth98xsNtXiiV/+ HuNj8An7BBgOLg5Xzp+myZ0ceehexTVIWYatq52yqqEvzn52lM+mFEKoC+4Aa4p40V8w 93BCDpRE2UXn/xExXBcxDX0+XD1vt3uG3JNJ5hju/gnJshg/rPKFLJotpTupLmli7zMJ DAi43hxvJ+Fyp/Tw3pfXu+biBidLSesoe58c3L8rvl6iXxVQ7VFpGeUfPVmrVGvLpdyJ pjzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=cQZWpJxg8VVtXB1d16XYQKR76JiAKHjQNWiwxXHYWH8=; b=sUg8bT4Dl7acEFjOp6+CVwofeVNNVKmcXftMvz6JQChQz2C8ZKhz6MxWyGet9ovzMv KaNEHA4eaUUVK5nBlZ6nHKU2oscJ85aYbjfTkkSzazQNwH6dQCodSH6A4FRVlV5elPSL vrJv3KyGL609KuxpUoVUOpAgIYYWfMsG5fUemjo1bIsx5Hv7J5W1AUB6nA40SVuEyteZ hQt/xaOeS4QWviMpb+j+HtAcufdaU3lix9fevN2PuoHRQqzwapyaRBVBXwp9I6pbJSfs c7RMuVmFkTrWZ0DAdtXwqIUgHO3u+/jvVixCpFLo2MLzA8BdxbvacnWlf7i0YMJ4ce/L ImtA== 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 207-v6si15290791pgf.245.2018.10.02.11.02.30; Tue, 02 Oct 2018 11:02:45 -0700 (PDT) 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 S1727719AbeJCA1q convert rfc822-to-8bit (ORCPT + 99 others); Tue, 2 Oct 2018 20:27:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34106 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727449AbeJCA1q (ORCPT ); Tue, 2 Oct 2018 20:27:46 -0400 Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 155F78764F; Tue, 2 Oct 2018 17:43:15 +0000 (UTC) Received: from llong.remote.csb (dhcp-17-55.bos.redhat.com [10.18.17.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 94FB59D80A; Tue, 2 Oct 2018 17:43:13 +0000 (UTC) Subject: Re: [PATCH v8 3/5] ipc: Allow boot time extension of IPCMNI from 32k to 2M To: Manfred Spraul , Davidlohr Bueso Cc: "Luis R. Rodriguez" , Kees Cook , Andrew Morton , Jonathan Corbet , 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 References: <1529317698-16575-1-git-send-email-longman@redhat.com> <1529317698-16575-4-git-send-email-longman@redhat.com> <20180817164548.GA32382@linux-r8p5> <5ddb67bb-872b-c8c1-7838-2622195ae1fc@redhat.com> <02ebafee-a295-58cf-044e-e2df0e878e0d@colorfullife.com> From: Waiman Long Organization: Red Hat Message-ID: <8c9dda74-c9fb-cc18-5af4-c081dbb8b154@redhat.com> Date: Tue, 2 Oct 2018 13:43:13 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <02ebafee-a295-58cf-044e-e2df0e878e0d@colorfullife.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 02 Oct 2018 17:43:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/02/2018 12:32 PM, Manfred Spraul wrote: > Hello together, > > On 8/18/18 3:15 AM, Waiman Long wrote: >> On 08/17/2018 12:45 PM, Davidlohr Bueso wrote: >>> Cc'ing Manfred. >>> >>> On Mon, 18 Jun 2018, Waiman Long wrote: >>> >>>> The maximum number of unique System V IPC identifiers was limited to >>>> 32k. That limit should be big enough for most use cases. >>>> >>>> However, there are some users out there requesting for more. To >>>> satisfy >>>> the need of those users, a new boot time kernel option "ipcmni_extend" >>>> is added to extend the IPCMNI value to 2M. This is a 64X increase >>>> which >>>> hopefully is big enough for them. >>> Could you please provide more info on the need of these users and how >>> you came up with this new value (which just seems quite arbitrary)? >>> >>> Thanks, >>> Davidlohr >> Red Hat has a customer that is migrating from Solaris to Linux. Some of >> their applications just happen to use more than 32k of shared memory >> segments. I think Solaris allows up to 16M unique ID. >> >> Yes, the amount of increase is a bit arbitrary. I was trying to balance >> how many bits should be left for sequence number. Maybe I should just >> take 8 more bits for ID and leave 8 bits for sequence number to match >> Solaris. > > - I think we should use the same numbers as Solaris. > Otherwise we later have to touch it again. As said in my patch, it is a trade-off between # of uniq identifiers versus the chance of id reuse. I don't have an objection to increase it further, but I don't see the customers to really need such a large value. > > - What is the performance when using shmget() with already 10M > segments present? I am not sure the performance impact as I had not measure it myself. The shmget() function is considered in slowpath. We are generally less concern about its performance than other code paths that are in a performance critical path. > > - I like the new logic for updating the sequence counter. > > Is there a reason why you only enable it for extended mode? I tried not to disturb the existing logic for backward compatibility concern. I don't mind switching it all over to use the new "deleted" approach if other people have no objection. Cheers, Longman > You create a rarely used codepath, and I don't understand what speaks > against switching to the 'deleted' approach for all systems. > > > -- > > Manfred >