Date: Mon, 30 Mar 2015 16:37:10 -0400 From: John Baldwin <jhb@freebsd.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans <brde@optusnet.com.au> Subject: Re: svn commit: r280279 - head/sys/sys Message-ID: <1853187.nsx00mfzo7@ralph.baldwin.cx> In-Reply-To: <20150330172434.GG2379@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <2526359.g5B2nXdKeQ@ralph.baldwin.cx> <20150330172434.GG2379@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1853187.nsx00mfzo7>