Date: Fri, 12 Nov 2004 08:52:14 +1030 From: Malcolm Kay <malcolm.kay@internode.on.net> To: Dan Nelson <dnelson@allantgroup.com> Cc: freebsd-questions@freebsd.org Subject: Re: PID in linux emulation Message-ID: <200411120852.14255.malcolm.kay@internode.on.net> In-Reply-To: <20041111154700.GA4702@dan.emsphone.com> References: <200411111935.01396.malcolm.kay@internode.on.net> <20041111154700.GA4702@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411120852.14255.malcolm.kay>