From owner-svn-src-all@FreeBSD.ORG Mon Mar 30 20:44:36 2015 Return-Path: Delivered-To: svn-src-all@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 C8DCED2F; Mon, 30 Mar 2015 20:44:36 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::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 9F3E0295; Mon, 30 Mar 2015 20:44:36 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 10743B98C; Mon, 30 Mar 2015 16:44:35 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r280279 - head/sys/sys Date: Mon, 30 Mar 2015 16:37:10 -0400 Message-ID: <1853187.nsx00mfzo7@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150330172434.GG2379@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <2526359.g5B2nXdKeQ@ralph.baldwin.cx> <20150330172434.GG2379@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 30 Mar 2015 16:44:35 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Mon, 30 Mar 2015 20:44:36 -0000 On Monday, March 30, 2015 08:24:34 PM Konstantin Belousov wrote: > > That is not what Bruce said. He suggested using bitcount64() for the fallback > > if the cpuid check fails. He did not say to remove the runtime check to use > > popcnt if it is available: > > > > "Always using [bitcount64] would lose the micro-optimization... [to] keep > > [it], it seems best to keep the inline asm but replace popcnt_pc_map_elem(elem) > > by [bitcount64(elem)]." > Ok, thank you for the clarification. > > I updated the pmap patch, see the end of the message. I think the pmap change looks fine. If we know which compilers include a workaround we might also consider specifying "-mno-popcount" for everything except known-ok compilers in at least kern.mk. > > This looks fine to me. It seems to be manually converting certain symbols > > to use a dynamic lookup that must be explicitly resolved before first > > use? > I am not sure what do you mean by dynamic lookup, but possibly it > was mentioned. I can emulate the ifuncs more sincerely, by requiring > a resolver function, which is called on the first real function > invocation. I did not see it as very useful, but it is definitely > doable. I just mean that the effect at runtime is similar to that of dynamic symbols once they are resolved (a call into a PLT entry (or is it GOT? I keep getting those confused) that does a jump to the resolved symbol). -- John Baldwin