From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 13 20:18:05 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CEF7316A412; Wed, 13 Dec 2006 20:18:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C41F43EFA; Wed, 13 Dec 2006 20:11:56 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kBDKDLsc031289; Wed, 13 Dec 2006 15:13:21 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 13 Dec 2006 14:31:46 -0500 User-Agent: KMail/1.9.1 References: <20061212121714.a3fbb61b.wmoran@collaborativefusion.com> <20061213105021.c7d5b274.wmoran@collaborativefusion.com> <20061213183431.GC888@turion.vk2pj.dyndns.org> In-Reply-To: <20061213183431.GC888@turion.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612131431.46838.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 13 Dec 2006 15:13:22 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2325/Wed Dec 13 12:04:05 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: hackers@freebsd.org, Bill Moran , Kris Kennaway Subject: Re: shmmax tops out at 2G? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2006 20:18:06 -0000 On Wednesday 13 December 2006 13:34, Peter Jeremy wrote: > On Wed, 2006-Dec-13 10:50:21 -0500, Bill Moran wrote: > >In response to Bill Moran : > >> sysctl kern.ipc.shmmax=2200000000 > >> kern.ipc.shmmax: 2100000000 -> -2094967296 > >> > >> Looks like an unsigned 32-bit int. That doesn't seem to scale as well as > >> would be expected on 64-bit arch (or PAE for that matter). > >> > >> Is this a mistake, or intentional? I'm working with some big memory > >> systems, and I sure would like to allocate more than 2G for PostgreSQL > >> to use ... > > I thought POSIX specified 'int' but I may be mis-remembering. Tru64 > uses int (and 2GB max) whilst Solaris allows 64-bit values. > Logically, shm_segsz and shm{min,max} should be intptr_t, shmall is > less clear but probably should be similar. Actually, unless you are holding a pointer, it should be size_t. size_t is also the same size as a pointer (in practice), but it's for the size of objects in memory (i.e. what sizeof() returns), so I do think size_t is more appropriate. The painful thing here will be destroying the SYSVIPC ABI on 64-bit archs. Bill, you should go talk to Robert Watson and time it with him as he wants to fix SYSVIPC to use uid_t which breaks the ABI, and if we're going to break the ABI, we should do it all at once. :) -- John Baldwin