From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 23 19:08:31 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3B3A1065930 for ; Mon, 23 Feb 2009 19:08:31 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from mx-02mtaout02.mts.net (mx-02mtaout02.mts.net [142.161.131.4]) by mx1.freebsd.org (Postfix) with ESMTP id 5FC428FC18 for ; Mon, 23 Feb 2009 19:08:31 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from wnpgmb021pw-sp03.mts.net ([10.204.128.23]) by mx-02mtaout02.mts.net with ESMTP id <20090223190830.QOGY3962.mx-02mtaout02.mts.net@wnpgmb021pw-sp03.mts.net> for ; Mon, 23 Feb 2009 13:08:30 -0600 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqEEAFeDokmOoSMW/2dsb2JhbACBbtQPhA8G X-IronPort-AV: E=Sophos;i="4.38,255,1233554400"; d="scan'208";a="63984503" Received: from wnpgmb1307w-ad02-35-22.dynamic.mts.net (HELO jnz.my.domain) ([142.161.35.22]) by wnpgmb021pw-sp03.mts.net with ESMTP; 23 Feb 2009 13:08:29 -0600 Received: from jnz.my.domain (localhost [127.0.0.1]) by jnz.my.domain (8.14.3/8.14.2) with ESMTP id n1NJ8TYh035007; Mon, 23 Feb 2009 13:08:29 -0600 (CST) (envelope-from csjp@jnz.my.domain) Received: (from csjp@localhost) by jnz.my.domain (8.14.3/8.14.2/Submit) id n1NJ8SOP035006; Mon, 23 Feb 2009 13:08:28 -0600 (CST) (envelope-from csjp) Date: Mon, 23 Feb 2009 13:08:28 -0600 From: Christian Peron To: "Brian A. Seklecki" Message-ID: <20090223190828.GA34866@jnz.sqrt.ca> References: <1235404207.31655.2085.camel@soundwave.ws.pitbpa0.priv.collaborativefusion.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1235404207.31655.2085.camel@soundwave.ws.pitbpa0.priv.collaborativefusion.com> User-Agent: Mutt/1.4.2.3i Cc: Kirk Strauser , freebsd-hackers@freebsd.org, wmoran@potentialtech.com 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: Mon, 23 Feb 2009 19:08:33 -0000 This issue has come up a number of times. I was looking into fixing this but I just have not had the time. The basic issue is our shmid_ds structure: struct shmid_ds { struct ipc_perm shm_perm; /* operation permission structure */ int shm_segsz; /* size of segment in bytes */ pid_t shm_lpid; /* process ID of last shared memory op */ pid_t shm_cpid; /* process ID of creator */ short shm_nattch; /* number of current attaches */ time_t shm_atime; /* time of last shmat() */ time_t shm_dtime; /* time of last shmdt() */ time_t shm_ctime; /* time of last change by shmctl() */ void *shm_internal; /* sysv stupidity */ }; Basically the shm_segsz member needs to be switched from 32 bits (int) to 64 bits. The problem is that this breaks the ABI and older versions of postgresql will not work. The solution is to add additional syscalls. However, everytime this issue comes up, the question on whether we should fix struct ipc_perm at the same time is asked. The answer imho is that we should, however this is more complex since semaphores, messaages and shared memory segments all use it. The fixes are straight forward, however making sure we maintain reverse compatability is where things become complicated, especially since there are multiple layers of reverse compat we need to look after. On Mon, Feb 23, 2009 at 10:50:07AM -0500, Brian A. Seklecki 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 > > Someone was nice enough to file a PR related to this: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/130274 > > We'd be happy to sponsor development in -current to address this > limitation. ~BAS > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"