From owner-svn-src-head@freebsd.org Sat Aug 4 07:48:29 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 7D4631061413; Sat, 4 Aug 2018 07:48:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5F6189DC4; Sat, 4 Aug 2018 07:48:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w747mHkm059067 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 4 Aug 2018 10:48:20 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w747mHkm059067 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w747mHc5059066; Sat, 4 Aug 2018 10:48:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 4 Aug 2018 10:48:17 +0300 From: Konstantin Belousov To: Gleb Smirnoff 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: <20180804074817.GH6049@kib.kiev.ua> References: <201807061950.w66Joibw081390@repo.freebsd.org> <20180803222739.GH420@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180803222739.GH420@FreeBSD.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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: Sat, 04 Aug 2018 07:48:29 -0000 On Fri, Aug 03, 2018 at 03:27:39PM -0700, Gleb Smirnoff wrote: > Hi Konstantin, > > On Fri, Jul 06, 2018 at 07:50:44PM +0000, Konstantin Belousov wrote: > K> Author: kib > K> Date: Fri Jul 6 19:50:44 2018 > K> New Revision: 336047 > K> URL: https://svnweb.freebsd.org/changeset/base/336047 > K> > K> Log: > K> Expand x86 struct pcpus to UMA_PCPU_ALLOC_SIZE AKA PAGE_SIZE. > K> > K> This restores counters(9) operation. > K> Revert r336024. Improve assert of pcpu size on x86. > K> > K> Reviewed by: mmacy > K> Sponsored by: The FreeBSD Foundation > K> Differential revision: https://reviews.freebsd.org/D16163 > > Since this has been broken already several times as people who edit > surrounding code don't understand the magic, and since now we round > the struct pcpu size to PAGE_SIZE anyways, what about stop carefully > craft the padding and just change alignment of struct pcpu to PAGE_SIZE? I do not see how it would avoided that breakage. Also, I like the explicitness in the padding, it is useful when new pcpu members are added. I have to do that more than once this year.