From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 4 05:47:31 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80C5A16A4CE for ; Thu, 4 Mar 2004 05:47:31 -0800 (PST) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D3AA43D3F for ; Thu, 4 Mar 2004 05:47:31 -0800 (PST) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 56F17654BB; Thu, 4 Mar 2004 13:47:30 +0000 (GMT) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 52396-01; Thu, 4 Mar 2004 13:47:29 +0000 (GMT) Received: from saboteur.dek.spc.org (82-147-17-88.dsl.uk.rapidplay.com [82.147.17.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 6D76565439; Thu, 4 Mar 2004 13:47:28 +0000 (GMT) Received: by saboteur.dek.spc.org (Postfix, from userid 1001) id 3698654; Thu, 4 Mar 2004 13:47:27 +0000 (GMT) Date: Thu, 4 Mar 2004 13:47:26 +0000 From: Bruce M Simpson To: Chris Smith Message-ID: <20040304134726.GL1875@saboteur.dek.spc.org> Mail-Followup-To: Chris Smith , freebsd-hackers@freebsd.org References: <200403031742.43986.chris@nfluid.co.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="M/SuVGWktc5uNpra" Content-Disposition: inline In-Reply-To: <200403031742.43986.chris@nfluid.co.uk> cc: freebsd-hackers@freebsd.org Subject: Re: Kernel SysV IPC defaults. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2004 13:47:31 -0000 --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--