From owner-cvs-all@FreeBSD.ORG Thu May 1 03:01:57 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B5791065676; Thu, 1 May 2008 03:01:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 17D658FC0A; Thu, 1 May 2008 03:01:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c220-239-252-11.carlnfd3.nsw.optusnet.com.au (c220-239-252-11.carlnfd3.nsw.optusnet.com.au [220.239.252.11]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m4130YLJ001386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 May 2008 13:00:37 +1000 Date: Thu, 1 May 2008 13:00:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "David O'Brien" In-Reply-To: <20080430180255.GB89079@dragon.NUXI.org> Message-ID: <20080501123943.V93454@delplex.bde.org> References: <200804291117.m3TBHjw3050979@repoman.freebsd.org> <20080430180255.GB89079@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Yar Tikhiy , src-committers@freebsd.org, cvs-all@freebsd.org, cvs-src@freebsd.org, Oleksandr Tymoshenko Subject: Re: cvs commit: src/sys/sys user.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2008 03:01:57 -0000 On Wed, 30 Apr 2008, David O'Brien wrote: > On Tue, Apr 29, 2008 at 05:41:18PM +0400, Yar Tikhiy wrote: >> On Tue, Apr 29, 2008 at 3:17 PM, Oleksandr Tymoshenko wrote: >>> gonzo 2008-04-29 11:17:45 UTC >>> Modified files: >>> sys/sys user.h >>> Log: >>> Define KINFO_PROC_SIZE for mips. > .. >> Perhaps it's time to introduce MD .h files for that instead of adding >> MD #ifdefs to the MI .h file, isn't it? I.e., can include >> , which can define KINFO_PROC_SIZE and its possible >> friends. > > I would like to see us go in that direction also. KINFO_PROC_SIZE is special. It can only be determined by looking at the MI struct declared in , and the looking must not be automated since the reason for existence of this macro is to prevent automated changes to the size of the struct. I would have used a definition like KI_NVOIDSTAR * sizeof(void *) + KI_NINTMAX_T * sizeof(intmax_t) + ... where KI_N* are MI. This requires the struct to not have any padding or for the padding to be countable by and actually counted by an expression like the above. Unfortunately, the struct is not laid out very carefully, (it has nested structs which it cannot control the layout of) so it might have MD padding which would make some of the KI_N*'s MD. All padding is MD in theory, but in practice padding can be made almost MI by a careful layout. Bruce