Date: Thu, 4 Mar 2004 13:47:26 +0000 From: Bruce M Simpson <bms@spc.org> To: Chris Smith <chris@nfluid.co.uk> Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel SysV IPC defaults. Message-ID: <20040304134726.GL1875@saboteur.dek.spc.org> In-Reply-To: <200403031742.43986.chris@nfluid.co.uk> References: <200403031742.43986.chris@nfluid.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
--M/SuVGWktc5uNpra Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 03, 2004 at 05:42:43PM +0000, Chris Smith wrote: > Consider MSGMAX (max bytes in a message) and MSGMNB (max bytes in a queue) > The defaults are MSGMAX > MSGMNB, which is clearly backwards. I see this. How about the attached patch? I can understand people still using the SYSV IPC mechanisms for the sake of compatibility, but I suspect the purists are loathe to touch it. BMS --M/SuVGWktc5uNpra Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sysvmsg.diff" Index: src/sys/kern/sysv_msg.c =================================================================== RCS file: /home/ncvs/src/sys/kern/sysv_msg.c,v retrieving revision 1.52 diff -u -r1.52 sysv_msg.c --- src/sys/kern/sysv_msg.c 7 Nov 2003 04:47:14 -0000 1.52 +++ src/sys/kern/sysv_msg.c 4 Mar 2004 13:46:59 -0000 @@ -72,15 +72,15 @@ #ifndef MSGSEG #define MSGSEG 2048 /* must be less than 32767 */ #endif -#define MSGMAX (MSGSSZ*MSGSEG) -#ifndef MSGMNB -#define MSGMNB 2048 /* max # of bytes in a queue */ -#endif #ifndef MSGMNI -#define MSGMNI 40 +#define MSGMNI 40 /* # of message queue identifiers */ #endif #ifndef MSGTQL -#define MSGTQL 40 +#define MSGTQL 40 /* max messages in system */ +#endif +#define MSGMAX (MSGSSZ*MSGSEG) /* max # of bytes in a message */ +#ifndef MSGMNB +#define MSGMNB (10*MSGMAX) /* max chars in a queue */ #endif /* --M/SuVGWktc5uNpra--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040304134726.GL1875>