From owner-svn-src-head@FreeBSD.ORG Wed Jun 22 18:58:46 2011 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96142106566B; Wed, 22 Jun 2011 18:58:46 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 2DB168FC16; Wed, 22 Jun 2011 18:58:45 +0000 (UTC) Received: from c122-106-165-191.carlnfd1.nsw.optusnet.com.au (c122-106-165-191.carlnfd1.nsw.optusnet.com.au [122.106.165.191]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p5MIwhI4017074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 23 Jun 2011 04:58:44 +1000 Date: Thu, 23 Jun 2011 04:58:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin In-Reply-To: <201106220948.02421.jhb@freebsd.org> Message-ID: <20110623045454.U1550@besplex.bde.org> References: <201106191913.p5JJDOqJ006272@svn.freebsd.org> <20110622063258.D2275@besplex.bde.org> <201106220948.02421.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, Alan Cox , svn-src-all@FreeBSD.org, "Bjoern A. Zeeb" , Bruce Evans , svn-src-head@FreeBSD.org Subject: Re: svn commit: r223307 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2011 18:58:46 -0000 On Wed, 22 Jun 2011, John Baldwin wrote: > On Tuesday, June 21, 2011 4:58:10 pm Bruce Evans wrote: >> On Tue, 21 Jun 2011, Bjoern A. Zeeb wrote: >>> ... >>> vm_page.o: In function `vm_page_clear_dirty': >>> /sys/vm/vm_page.c:(.text+0x18d0): undefined reference to `atomic_clear_8' >>> /sys/vm/vm_page.c:(.text+0x18d0): relocation truncated to fit: R_MIPS_26 against `atomic_clear_8' >>> vm_page.o: In function `vm_page_set_validclean': >>> /sys/vm/vm_page.c:(.text+0x38f0): undefined reference to `atomic_clear_8' >>> /sys/vm/vm_page.c:(.text+0x38f0): relocation truncated to fit: R_MIPS_26 against `atomic_clear_8' >> >> Atomic types shorter than int cannot be used in MI code, since they might >> not exist. Apparently they don't exist on mips. jake@ fixed all their >> old uses for sparc4 in ~Y2K. > > I agree. Is there any harm in having the 'dirty' and 'valid' fields in > vm_page always be at least of size 'int'? > > In the case of amd64, vm_page would change from a size of 120 bytes to 128. > > On i386 I think you'd end up changing the size from 68 to 76. > > (Using an int results in alignment padding after 'busy'.) That is quite a bit. Perhaps the struct should be packed better so that each char -> int expansion takes <= 3 bytes instead of >= 4. The expansion might even be negative. It is only moderately well packed now. > Hmm, that's around 120k of extra vm_page_t space for a machine with 64M of > RAM, so around 0.18% of RAM would be used on both platforms (presumably the > usage would be similar on other platforms as well). At 24 GB of RAM, the > extra space is just under 0.20% of RAM (48M). Bruce