From owner-svn-src-head@freebsd.org Tue Aug 7 22:00:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE6B2106C4F0; Tue, 7 Aug 2018 22:00:31 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [198.45.61.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BCF58332A; Tue, 7 Aug 2018 22:00:31 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id w77M0NaK087187 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 7 Aug 2018 15:00:23 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id w77M0NGr087186; Tue, 7 Aug 2018 15:00:23 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Tue, 7 Aug 2018 15:00:23 -0700 From: Gleb Smirnoff To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336047 - in head/sys: amd64/include i386/include sys Message-ID: <20180807220023.GY420@FreeBSD.org> References: <201807061950.w66Joibw081390@repo.freebsd.org> <20180803222739.GH420@FreeBSD.org> <20180804074817.GH6049@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180804074817.GH6049@kib.kiev.ua> User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 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, 07 Aug 2018 22:00:32 -0000 On Sat, Aug 04, 2018 at 10:48:17AM +0300, Konstantin Belousov wrote: K> On Fri, Aug 03, 2018 at 03:27:39PM -0700, Gleb Smirnoff wrote: K> > Hi Konstantin, K> > K> > On Fri, Jul 06, 2018 at 07:50:44PM +0000, Konstantin Belousov wrote: K> > K> Author: kib K> > K> Date: Fri Jul 6 19:50:44 2018 K> > K> New Revision: 336047 K> > K> URL: https://svnweb.freebsd.org/changeset/base/336047 K> > K> K> > K> Log: K> > K> Expand x86 struct pcpus to UMA_PCPU_ALLOC_SIZE AKA PAGE_SIZE. K> > K> K> > K> This restores counters(9) operation. K> > K> Revert r336024. Improve assert of pcpu size on x86. K> > K> K> > K> Reviewed by: mmacy K> > K> Sponsored by: The FreeBSD Foundation K> > K> Differential revision: https://reviews.freebsd.org/D16163 K> > K> > Since this has been broken already several times as people who edit K> > surrounding code don't understand the magic, and since now we round K> > the struct pcpu size to PAGE_SIZE anyways, what about stop carefully K> > craft the padding and just change alignment of struct pcpu to PAGE_SIZE? K> I do not see how it would avoided that breakage. Also, I like the K> explicitness in the padding, it is useful when new pcpu members are K> added. I have to do that more than once this year. I was wrong. __aligned would do proper placement of items in an array, but sizeof would return lesser value. -- Gleb Smirnoff