Date: Sat, 22 Sep 2012 16:34:12 +0200 From: "O. Hartmann" <ohartman@zedat.fu-berlin.de> To: Dimitry Andric <dimitry@andric.com> Cc: freebsd-current@FreeBSD.org, freebsd-toolchain@FreeBSD.org Subject: Re: More kernel performance tests on FreeBSD 10.0-CURRENT Message-ID: <505DCC64.2010805@zedat.fu-berlin.de> In-Reply-To: <505DC299.4090407@andric.com> References: <505CDE9C.3060504@andric.com> <505D6A51.7090808@zedat.fu-berlin.de> <505DA447.40601@andric.com> <505DB49B.1090304@zedat.fu-berlin.de> <505DC299.4090407@andric.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7B925003902EC42F78AD1A32 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 09/22/12 15:52, schrieb Dimitry Andric: > On 2012-09-22 14:52, O. Hartmann wrote: > ... >> When we used FreeBSD for scientific work, that was around 1998 - 2002,= >> there were some attempts made to use Intel's icc compiler suite on >> FreeBSD in the 32Bit Linuxulator. That time I used that compiler only >> for compiling my modelling software, but there where reports of people= >> made it possible to use the icc compiler also for compiling the FreeBS= D >> system - with success as far as I know. What happened since then and >> more recent days that the sources got "polluted" by those hacks? >=20 > The Intel compiler support has been largely removed, because it was not= > maintained. There are still remnants in cdefs.h though, and in theory > it could be revived, if there was enough interest. >=20 > However, Intel simply does not support anything else besides Windows an= d > Linux for its compiler suite, and even on the Linux side you are best > off if you use Red Hat or a Red Hat-based distribution such as CentOS o= r > Scientific Linux. >=20 > Some time ago I attempted to get a fairly recent Intel compiler version= > working on FreeBSD, but it was very tricky, and I remember I did not ge= t > everything working correctly. >=20 > So unless either Intel starts supporting FreeBSD (or other BSDs), which= > is very unlikely, or somebody manages to get the Linux version working > perfectly as a port, I don't see much sense in restoring the Intel > compiler support. True. It is use- and senseless, from my point of view, having ancient 32bit support only via the Linuxulator (which is 32bit only). The ICC was only useable on 32bit machines and FBSD 32bit (i386), which isn't any kind of an option nowadays. The same discussion has been triggered with CUDA and Linuxulator. >=20 >=20 >> No offense to you, but somehow this sounds that the efford has been >> placed in the wrong way since people revert with energy that what has >> been hacked with energy ;-) >=20 > I think you see this incorrectly; when I removed the Intel compiler > support from the tree, it was unmaintained for several years already. > Apparently there was very little interest for it. To avoid further misunderstandings - I have no objections cleaning up the sources from unmaintained legacy. Since FreeBSD doesn't have 64Bit Linux support, the effort is wasted energy (my opinion, even if it is sometimes nice to see how it would perform ...). >=20 >=20 > ... >>> I have already done a few preliminary tests for -march=3Dnative, but = at >>> least for clang, there seems to be no measureable difference in >>> performance. The tests for gcc are still running. >> >> I was wondering if the organisation and amount of cache present in a >> modern CPU is not taken into account when optimising code. Our Core2Du= o >> CPUs still in use do have different architectural features than the mo= re >> recent Core-i7 systems. Latter ones have level 3 caches. How does a >> compiler take advantage of those features by not given an explicit hin= t? >=20 > I don't think the amount of CPU cache, or the number of levels, is take= n > into account, really. When you select a certain CPU type with -march, > the compiler will just enable several features that are supported on > that CPU, e.g. MMX, SSE, AVX and so on. It can also enable extra CPU > registers, and/or switch to slightly different instruction scheduling. Well, I'm not that deep into compiler development. I thought that optimizations are also done on the level of caches a CPU has and the size of it. >=20 > But since we are compiling the kernel with -mno-mmx, -mno-sse and even > floating point disabled, apparently there is no real gain from > specifying higher CPU types. I never came deeper into this logic - since I'm no operating system developer. But please correct me and, if possible, enlighten me, if there is something wrong in my understanding. Assumed, the option "-march=3Dnative" is switched on and the only "optimisation" is performed= due to selection of code portions at compile time which are enclosed, say in #ifdef __AVX__ __some__nasty__vector_ops_256bitwide(); #endif which is triggered by the "#define __AVX__" on Core-i7 CPUs with __AVX__ support, why is this explicitely disabled via "-no-avx" and friends? I would assume the developer has a reason not to use those speedy facilities, so I wouldn't expect any portion of #ifdef __AVX__ et cetera in the kernel code. The only explanation, from this naive point of view is, the compiler DOES DO some optimisations regarding the presence of such facilities and the "-no-XXX" options avoid those. Conclusively, I would expect a kind of performance gain when those features are made accessible. On the other hand, why are those features disabled? Intels silica is the reduced to something that gain speed from the clock cycle and the internal bandwidth due to cache sizes and clock speed and, naively spoken, all reduces to something "compatible" from ancients in the past. I can not fathom what the benefit of a Core i7 CPU then is compared to a Core2Duo when all the neat features are not used. A time ago, I read something about a Linux development for malloc(), which also utilises SSE facilities. I have no deeper clue what that development has achieved so far, but when I read the first time about it, they claim having 30% more performance gain over traditional SSE-less= =2E But this is something I do not know much about. >=20 > -Dimitry Oliver --------------enig7B925003902EC42F78AD1A32 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJQXcxpAAoJEOgBcD7A/5N8KCoIAMAtybYEGYgNy/38RhW7Nxud PXyT5P8ufDMbGEGRp6PYAAIbHvNQD0dS7/PCIeFDMxkhN3b0IXSuYOz9blq5zk7i vwSshSOhlGOqi3FEFJbzTOeSgrmNoLcyp/HdUjCDcP+MgbXIuj/qTrjJ3ItwLQHm 3EM0UrSsKEdZZYcHMrRkwL/jIXPOI3Jf4rS30xAWXjP3c+DW4PFqgw4Ux+ZYBxi7 JXyMuLJTFlfsosvnJn+7h/90PoOWJT6hT+mKQGIo4TZrcf3a2DnuoHJu9gx/DxaC WCc8zTHgKNE1dNJqWkkQt/5Z7KSckyUfup9XNqHofWoS5YlQuPvRWnMXalm6S1M= =53XY -----END PGP SIGNATURE----- --------------enig7B925003902EC42F78AD1A32--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?505DCC64.2010805>