From owner-svn-src-head@FreeBSD.ORG Tue Apr 9 19:57:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D9A7E722; Tue, 9 Apr 2013 19:57:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 64E8E982; Tue, 9 Apr 2013 19:57:51 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r39Jvp1v055609; Tue, 9 Apr 2013 23:57:51 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r39Jvp3I055608; Tue, 9 Apr 2013 23:57:51 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 9 Apr 2013 23:57:51 +0400 From: Gleb Smirnoff To: John Baldwin Subject: Re: svn commit: r249265 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include sys Message-ID: <20130409195751.GY76816@FreeBSD.org> References: <201304081919.r38JJAvB088644@svn.freebsd.org> <201304081541.27408.jhb@freebsd.org> <20130408194436.GI76816@FreeBSD.org> <201304091520.25575.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201304091520.25575.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 09 Apr 2013 19:57:52 -0000 On Tue, Apr 09, 2013 at 03:20:25PM -0400, John Baldwin wrote: J> > J> > Log: J> > J> > Merge from projects/counters: J> > J> > J> > J> > Pad struct pcpu so that its size is denominator of PAGE_SIZE. This J> > J> > is done to reduce memory waste in UMA_PCPU_ZONE zones. J> > J> > J> > J> > Sponsored by: Nginx, Inc. J> > J> > J> > J> > Modified: head/sys/sys/pcpu.h J> > J> > J> > J> ============================================================================== J> > J> > --- head/sys/sys/pcpu.h Mon Apr 8 19:10:45 2013 (r249264) J> > J> > +++ head/sys/sys/pcpu.h Mon Apr 8 19:19:10 2013 (r249265) J> > J> > @@ -180,6 +180,14 @@ struct pcpu { J> > J> > PCPU_MD_FIELDS; J> > J> > } __aligned(CACHE_LINE_SIZE); J> > J> J> > J> Why not change this to be PAGE_SIZE rather than putting explicit padding in J> > J> all the pcpu fields? That would seem to be more maintainable. J> > J> > Because it can be smaller than PAGE_SIZE. Two times smaller, four times smaller. J> J> Ugh, I didn't parse the "denominator" part correctly. I had read it as J> "multiple". OTOH, it seems quite cheap even on a 32-bit platform to lose J> 3k per core (assuming 4k page size and 1k pcpu). There could be several UMA_ZONE_PCPU zones. -- Totus tuus, Glebius.