From owner-svn-src-head@FreeBSD.ORG Thu Apr 2 14:34:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0021BB2F; Thu, 2 Apr 2015 14:34:25 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 78529D6A; Thu, 2 Apr 2015 14:34:24 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t32EYKnU066532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Apr 2015 17:34:20 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t32EYKOv066531; Thu, 2 Apr 2015 17:34:20 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 2 Apr 2015 17:34:20 +0300 From: Gleb Smirnoff To: Mateusz Guzik Subject: Re: svn commit: r280971 - in head: contrib/ipfilter/tools share/man/man4 sys/contrib/ipfilter/netinet sys/netinet sys/netipsec sys/netpfil/pf Message-ID: <20150402143420.GI64665@FreeBSD.org> References: <201504012226.t31MQedN044443@svn.freebsd.org> <1427929676.82583.103.camel@freebsd.org> <20150402123522.GC64665@FreeBSD.org> <20150402133751.GA549@dft-labs.eu> <20150402134217.GG64665@FreeBSD.org> <20150402135157.GB549@dft-labs.eu> <1427983109.82583.115.camel@freebsd.org> <20150402142318.GC549@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150402142318.GC549@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ian Lepore X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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: Thu, 02 Apr 2015 14:34:26 -0000 On Thu, Apr 02, 2015 at 04:23:18PM +0200, Mateusz Guzik wrote: M> Well, a thread migrating to another cpu is the standard thing everyone M> sees. How often do you see it right in a particular window of 2 or 3 instructions? If you carefully read the thread I referred to, you would notice that on many arches, save amd64 and i386, all systems stats are prone to mangling the stats due to migration within PCPU_INC. Look here: grep '^#define PCPU_ADD' sys/*/include/pcpu.h Do we have reports on not precise enough statistics, yet? M> I don't feel that strongly about changing the code. If it stays as it M> is, it definitely needs the comment I mentioned explaining why migration M> is fine. I just added the comment. M> If the code was to be changed a machdep counter_u64_fetchadd seems like M> the only course of action. If we have more places in kernel, where such API is required, I would do it. Alas, seems like not possible to make it without critical section, even on amd64. Note that counter_u64_add() on amd64 is critical-less. -- Totus tuus, Glebius.