From owner-svn-src-all@freebsd.org Sun Jul 31 16:35:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89378BAAB96; Sun, 31 Jul 2016 16:35:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2259F1C8C; Sun, 31 Jul 2016 16:35:32 +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 u6VGZR3W086517 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 31 Jul 2016 19:35:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u6VGZR3W086517 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u6VGZRsB086516; Sun, 31 Jul 2016 19:35:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 31 Jul 2016 19:35:27 +0300 From: Konstantin Belousov To: Bruce Evans Cc: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303583 - head/sys/amd64/amd64 Message-ID: <20160731163527.GZ83214@kib.kiev.ua> References: <201607311134.u6VBY81j031059@repo.freebsd.org> <20160731220407.Q3033@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160731220407.Q3033@besplex.bde.org> User-Agent: Mutt/1.6.1 (2016-04-27) 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2016 16:35:33 -0000 On Sun, Jul 31, 2016 at 11:11:25PM +1000, Bruce Evans wrote: > On Haswell, "rep stos" takes about 25 cycles to start up, and the function > call overhead is in the noise. 25 cycles is a lot. Haswell can move > 32 bytes/cycle from L2 to L2, so it misses moving 800 bytes or 1/5 of a > page in its startup overhead. Oops, that is for "rep movs". "rep stos" > is similar. > The commit message contained a probable explanation of the reason why the change demonstrated measurable improvement in non-microbenchmark load. That said, the only thing I am answering and asking there is the above claim about 25 cycles overhead of rep;stosq on hsw. I am curious how the overhead was measured. Note: Agner Fog' tables state that fast mode takes <2n uops and has reciprocal throughput of 0.5n worst case and do not demostrate any setup overhead for hsw.