From owner-freebsd-questions@FreeBSD.ORG Fri Nov 12 07:12:09 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D94F716A4CE for ; Fri, 12 Nov 2004 07:12:09 +0000 (GMT) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3896743D48 for ; Fri, 12 Nov 2004 07:12:09 +0000 (GMT) (envelope-from malcolm.kay@internode.on.net) Received: from beta.home (ppp32-13.lns1.adl1.internode.on.net [150.101.32.13]) iAC7C04Y005578; Fri, 12 Nov 2004 17:42:01 +1030 (CST) From: Malcolm Kay Organization: at home To: Dan Nelson Date: Fri, 12 Nov 2004 08:52:14 +1030 User-Agent: KMail/1.5.4 References: <200411111935.01396.malcolm.kay@internode.on.net> <20041111154700.GA4702@dan.emsphone.com> In-Reply-To: <20041111154700.GA4702@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200411120852.14255.malcolm.kay@internode.on.net> cc: freebsd-questions@freebsd.org Subject: Re: PID in linux emulation X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 07:12:10 -0000 On Fri, 12 Nov 2004 02:17 am, Dan Nelson wrote: > In the last episode (Nov 11), Malcolm Kay said: > > I am attempting to run a commercial CAD software suite compiled for > > Linux on a FreeBSD 4.10 OS. It runs as well or perhaps better than on > > a Linux box until the PID becomes large. > > > > The MAX_PID for FreeBSD is 99999 while Linux has a limit of 0x8000. > > [...] > > > Can I edit in /usr/include/sys/proc.h and recompile the system > > (kernel) for a lower MAX_PID? Will it work? Will it lead to other > > complications? Is this where the kernel compilation obtains its > > value? > > Sure. You have to lower PID_MAX when running FreeBSD 2.x or ancient > IBCS code, too. There should be no ill effects. > Thanks, I'll give it a go. > > Can MAX_PID be changed via sysctl? > > > > Is there someway to reset the current PID without rebooting? > > PID_MAX could be converted into a sysctl/boot-time tuneable without > much trouble. The kernel uses values above PID_MAX for thread ids, so > I don't think moving the ceiling at runtime is a good idea. Allowing > it to be set to any value less than the boot-time limit should work > fine, though. > > You also might want to ask your vendor to fix their hardcoded limit. > There is no guarantee that the stock Linux kernel will use 16-bit pid > values forever, and there is already a "pidhashing" patch that bumps it > up to 4 million. Yes, I'll probably do this -- but I can't really demand any action to support a non-Linux OS. On the other hand the vendor has expressed some interest in my suggestion of a native FreeBSD version of his suite. But of course thes things take time. Malcolm