From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753794AbbDHNVw (ORCPT ); Wed, 8 Apr 2015 09:21:52 -0400 Received: from a.ns.miles-group.at ([95.130.255.143]:65275 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753059AbbDHNVu (ORCPT ); Wed, 8 Apr 2015 09:21:50 -0400 Message-ID: <55252B6B.7040907@nod.at> Date: Wed, 08 Apr 2015 15:21:47 +0200 From: Richard Weinberger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Pengfei Yuan <0xcoolypf@gmail.com> CC: Austin S Hemmelgarn , Mike Galbraith , LKML Subject: Re: Why not build kernel with -O3 References: <1428388995.3152.10.camel@gmail.com> <1428401356.3152.38.camel@gmail.com> <55241C51.8040107@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 08.04.2015 um 15:16 schrieb Pengfei Yuan: > 2015-04-08 20:19 GMT+08:00 Richard Weinberger : >> On Wed, Apr 8, 2015 at 3:00 AM, Pengfei Yuan <0xcoolypf@gmail.com> wrote: >>> Could you please provide some examples that I can investigate? >>> Thanks! >> >> It would be awesome if you could find out which gcc optimizations >> cause the speed up. >> "gcc -c -Q -O3 --help=optimizers" will help you. >> > > This is really helpful. > But I can only find very short description for each option from > https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html Yeah, but if you know -fXY gives a nice speed up we can add it to our CFLAGS if it makes sense and has not much downsides. Blindly enabling -O3 can be dangerous as it might make the generated code much bigger and the asm unreadable. >> Please also double check your results. >> You need do to multiple runs, etc... >> Especially the redis speed up looks odd. Does redis really spend that much time >> in the kernel? > > Redis is special among the six applications because it is single-threaded. Still it would be nice to now much more about the load and why -O3 helps. Thanks, //richard