From slitt at troubleshooters.com Sat Aug 7 23:59:30 2021 From: slitt at troubleshooters.com (Steve Litt) Date: Sat, 7 Aug 2021 16:59:30 -0400 Subject: Latest DNG software guide (20210807) now available Message-ID: <20210807165930.64b8b091@mydesk.domain.cxm> Hi all, As you know, the people on the DNG Devuan mailing list are developing documentation on how to make safe, resilient, maintainable and efficient software. The latest revision of this documentation can be downloaded, as a TGZ, at http://troubleshooters.com/linux/presentations/golug_software_guide_20210807.tgz This revision incorporates the input from the 8/4/2021 GoLUG meeting. It can be downloaded with a simple wget command. Please make sure the directory into which you downloaded the .tgz has no existing golug_software_guide directory, or else moves and deletions won't be respected. Thanks, SteveT Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques From levonshe at yandex.com Fri Aug 20 11:53:05 2021 From: levonshe at yandex.com (Lev Olshvang) Date: Fri, 20 Aug 2021 11:53:05 +0300 Subject: How user space applications can take advantage of CPU features Message-ID: <2447111629448161@mail.yandex.ru> An HTML attachment was scrubbed... URL: From rabin at rabin.io Fri Aug 27 16:48:31 2021 From: rabin at rabin.io (Rabin Yasharzadehe) Date: Fri, 27 Aug 2021 16:48:31 +0300 Subject: How user space applications can take advantage of CPU features In-Reply-To: <2447111629448161@mail.yandex.ru> References: <2447111629448161@mail.yandex.ru> Message-ID: I'm not much of an expert, but the first thing that comes to mind is the binary size and speed. If you only need to implement the code once, and have a single optimized version, the output will be smaller, and probably a bit faster. -- Rabin On Fri, 20 Aug 2021 at 11:54, Lev Olshvang wrote: > Morning people of the Linux ! > > Recently I came to a question I do not know the answer to although I am > with Linux for >20 years, > > I am talking about the CPU architecture features likes SIMD, SSE, AES, ... > and related gcc CPU architecture switches > -maes, -msse3, -msse4 -mrdrand are examples of such gcc switches. > > I know that OPENSSL queries CPU features in run-time and then selects > precompiled functions that takes advantage of a specific feature. > > I think the kernel does the same > > So I begin to think that such compiler switches are good only to C > functions which are written in a very specific way to allow gcc to > recognize graphic or crypto processing patterns and generate the assembly > in order to utilize those assem;y extensions. > Otherwise those switches does nothing good. > > Please enlighten me on the issue. > > Be Healthy, > Lev > _______________________________________________ > Linux-il mailing list > Linux-il at cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > -------------- next part -------------- An HTML attachment was scrubbed... URL: From slitt at troubleshooters.com Fri Aug 27 20:16:00 2021 From: slitt at troubleshooters.com (Steve Litt) Date: Fri, 27 Aug 2021 13:16:00 -0400 Subject: How user space applications can take advantage of CPU features In-Reply-To: References: <2447111629448161@mail.yandex.ru> Message-ID: <20210827131600.357f0140@mydesk.domain.cxm> I'm less of an expert than either of you, but still have a piece of advice: If you use CPU specific code, I'd suggest all of the CPU specific code be encapsulated within one or a very few objects, modules or data structures with associated functions, so that if the unexpected happens and you switch hardware, you can simply replace the object, module or data structure with associated functions. I think life would be hell if you had to search your whole codebase for CPU specific code. SteveT Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques Rabin Yasharzadehe said on Fri, 27 Aug 2021 16:48:31 +0300 >I'm not much of an expert, but the first thing that comes to mind is >the binary size and speed. >If you only need to implement the code once, and have a single >optimized version, the output will be smaller, and probably a bit >faster. > > > > > >-- >Rabin > > >On Fri, 20 Aug 2021 at 11:54, Lev Olshvang wrote: > >> Morning people of the Linux ! >> >> Recently I came to a question I do not know the answer to although I >> am with Linux for >20 years, >> >> I am talking about the CPU architecture features likes SIMD, SSE, >> AES, ... and related gcc CPU architecture switches >> -maes, -msse3, -msse4 -mrdrand are examples of such gcc switches. >> >> I know that OPENSSL queries CPU features in run-time and then >> selects precompiled functions that takes advantage of a specific >> feature. >> >> I think the kernel does the same >> >> So I begin to think that such compiler switches are good only to C >> functions which are written in a very specific way to allow gcc to >> recognize graphic or crypto processing patterns and generate the >> assembly in order to utilize those assem;y extensions. >> Otherwise those switches does nothing good. >> >> Please enlighten me on the issue. >> >> Be Healthy, >> Lev >> _______________________________________________ >> Linux-il mailing list >> Linux-il at cs.huji.ac.il >> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il >>