From owner-svn-src-head@freebsd.org Wed Feb 12 17:26:10 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4608623E2C1; Wed, 12 Feb 2020 17:26:10 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Hml60LMyz3ByB; Wed, 12 Feb 2020 17:26:09 +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 01CHQ8bd004341 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 12 Feb 2020 09:26:08 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 01CHQ8UV004340; Wed, 12 Feb 2020 09:26:08 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Wed, 12 Feb 2020 09:26:08 -0800 From: Gleb Smirnoff To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r357805 - head/sys/amd64/include Message-ID: <20200212172608.GD1253@FreeBSD.org> References: <202002121112.01CBCExs085630@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202002121112.01CBCExs085630@repo.freebsd.org> X-Rspamd-Queue-Id: 48Hml60LMyz3ByB X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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, 12 Feb 2020 17:26:10 -0000 On Wed, Feb 12, 2020 at 11:12:14AM +0000, Mateusz Guzik wrote: M> Author: mjg M> Date: Wed Feb 12 11:12:13 2020 M> New Revision: 357805 M> URL: https://svnweb.freebsd.org/changeset/base/357805 M> M> Log: M> amd64: store per-cpu allocations subtracted by __pcpu M> M> This eliminates a runtime subtraction from counter_u64_add. M> M> before: M> mov 0x4f00ed(%rip),%rax # 0xffffffff80c01788 M> sub 0x808ff6(%rip),%rax # 0xffffffff80f1a698 <__pcpu> M> addq $0x1,%gs:(%rax) M> M> after: M> mov 0x4f02fd(%rip),%rax # 0xffffffff80c01788 M> addq $0x1,%gs:(%rax) M> M> Reviewed by: jeff M> Differential Revision: https://reviews.freebsd.org/D23570 Neat optimization! Thanks. Why didn't we do it back when created counter? -- Gleb Smirnoff