From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: Re: InfiniBand-ocrdma: Delete unnecessary variable initialisations in 11 functions Date: Fri, 15 Jan 2016 16:26:36 +0100 Message-ID: <56990FAC.6000506@users.sourceforge.net> References: <566ABCD9.1060404@users.sourceforge.net> <567EDED5.4040201@users.sourceforge.net> <5697D865.5010507@users.sourceforge.net> <5697DE31.9040309@users.sourceforge.net> <20160115132014.GC30615@leon.nu> <56990733.7000506@users.sourceforge.net> <20160115150935.GA32346@leon.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20160115150935.GA32346-2ukJVAZIZ/Y@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Leon Romanovsky Cc: Devesh Sharma , Doug Ledford , Hal Rosenstock , Mitesh Ahuja , Sean Hefty , Selvin Xavier , LKML , kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Julia Lawall List-Id: linux-rdma@vger.kernel.org >> Would you like to clarify any measurable effects around the implementation >> detail when various variables will only be initialised immediately >> before they will be read again? > > Compiler will drop this variable initialization by itself because > there are no reads between this variable initialization and write. Which compiler variants would you to take into account for such an use case? > I recommend you to take a look on the assembly code and ensure it > by yourself. Will any configuration parameters and command arguments become relevant to improve also a corresponding software comparison? > The proposed change won't affect performance at all. Will unneeded variable assignments be really optimised away by default? By the way: Will a small source code reduction matter also a bit here? Regards, Markus -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751120AbcAOP0z (ORCPT ); Fri, 15 Jan 2016 10:26:55 -0500 Received: from mout.web.de ([212.227.17.11]:64428 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750717AbcAOP0w (ORCPT ); Fri, 15 Jan 2016 10:26:52 -0500 Subject: Re: InfiniBand-ocrdma: Delete unnecessary variable initialisations in 11 functions To: linux-rdma@vger.kernel.org, Leon Romanovsky References: <566ABCD9.1060404@users.sourceforge.net> <567EDED5.4040201@users.sourceforge.net> <5697D865.5010507@users.sourceforge.net> <5697DE31.9040309@users.sourceforge.net> <20160115132014.GC30615@leon.nu> <56990733.7000506@users.sourceforge.net> <20160115150935.GA32346@leon.nu> From: SF Markus Elfring X-Enigmail-Draft-Status: N1110 Cc: Devesh Sharma , Doug Ledford , Hal Rosenstock , Mitesh Ahuja , Sean Hefty , Selvin Xavier , LKML , kernel-janitors@vger.kernel.org, Julia Lawall Message-ID: <56990FAC.6000506@users.sourceforge.net> Date: Fri, 15 Jan 2016 16:26:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160115150935.GA32346@leon.nu> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:5umga5MnsLt+ZFIm6xjgOzHOfX44GLMXGbJT7Q0oqkbtZSK3e0s YhlXQBAghfufamzK9daKxqeaFbP2l2ALRcLaAArEeS1xKurpWCFzRYfSBG5CGr7eNKOV9mt LwT9r/3FwqlNfq6Nqfyy/SQX8D6PCp48ZeA2vSxLZZ7cGgIMZsLN7VUKrsvIUqR0Vmtx8hg JOhJ6uupTONULgKm9wkAA== X-UI-Out-Filterresults: notjunk:1;V01:K0:6RKWXkDh4dg=:oqCSMEuRnktbxwhXc36eha m+jlFTvux6WvC77RDecxjA6ygZlkzt2QBchsXQLTRvk3UbFWm/nB/eV25nBLli0fp4Ke/43mZ 5tEYdrl4NwUL9paBrD1MmSZJvegklllFL7KJ0Zff+4GtH4hqYhVWzCfPb6FEi30u1SbGKDWcW H5OTLglxWJJXvYvV+TNk6CT/fXnQO8wZf5Lild3FcjEAzjtW9wvoYzkrrcAYuGTqCA0XL2Pwq bThW0adUiRYimr/n7vdiNz5xTXtnKZ8fRgywJfB/GaRXTykOzGppJMxQEP1kqjTOsaIcPDkV/ Bst/TcTDP3m9cxHZP8UYmCL7kt+Tiqgn3MpgEhFoWZeFXlG+boFGIlXB01AeqPHgvLDcMwhxP gxvStIqbvZSWHf4xpECyAiDgG+8jaj0NhxuILfN3yA02yhKusf2hkfvgfNUp0LCLnim9k+0vk lVhnJjylS17zQaAL5u0F3eYONAJPktkHUzoio8Ts00gorri2ANh/I96094DWkmZSDioZkH8WJ ZF2fw9eyR62C7+OqMHln25l6CbGwU+ax8hSxH1fr2w3YJIQJk7IrWh3b7XmLo9AKf7xf+Xqgy bb1XJE/zqfiMXLr3VqM65CCh4R8EJd/DNtzfCfV0Bf9Qzq9U3BfANMYz0n7a5iFV+ThiXhHEh Fq6v7dr1gYqjeYWCJEBXdMm44Mr5J56LiDE2sfRjJf+vgJq08IE44RY5Jx8DWQfrsMmFBRuoV Wffc6hlSTM4Sn39rpqGlO/KPUQlhMIzENoioGhuJYQFx447gN0Ira8TJ33E990AS4RQHCyWk8 TLIE1mx Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> Would you like to clarify any measurable effects around the implementation >> detail when various variables will only be initialised immediately >> before they will be read again? > > Compiler will drop this variable initialization by itself because > there are no reads between this variable initialization and write. Which compiler variants would you to take into account for such an use case? > I recommend you to take a look on the assembly code and ensure it > by yourself. Will any configuration parameters and command arguments become relevant to improve also a corresponding software comparison? > The proposed change won't affect performance at all. Will unneeded variable assignments be really optimised away by default? By the way: Will a small source code reduction matter also a bit here? Regards, Markus From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Fri, 15 Jan 2016 15:26:36 +0000 Subject: Re: InfiniBand-ocrdma: Delete unnecessary variable initialisations in 11 functions Message-Id: <56990FAC.6000506@users.sourceforge.net> List-Id: References: <566ABCD9.1060404@users.sourceforge.net> <567EDED5.4040201@users.sourceforge.net> <5697D865.5010507@users.sourceforge.net> <5697DE31.9040309@users.sourceforge.net> <20160115132014.GC30615@leon.nu> <56990733.7000506@users.sourceforge.net> <20160115150935.GA32346@leon.nu> In-Reply-To: <20160115150935.GA32346-2ukJVAZIZ/Y@public.gmane.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Leon Romanovsky Cc: Devesh Sharma , Doug Ledford , Hal Rosenstock , Mitesh Ahuja , Sean Hefty , Selvin Xavier , LKML , kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Julia Lawall >> Would you like to clarify any measurable effects around the implementation >> detail when various variables will only be initialised immediately >> before they will be read again? > > Compiler will drop this variable initialization by itself because > there are no reads between this variable initialization and write. Which compiler variants would you to take into account for such an use case? > I recommend you to take a look on the assembly code and ensure it > by yourself. Will any configuration parameters and command arguments become relevant to improve also a corresponding software comparison? > The proposed change won't affect performance at all. Will unneeded variable assignments be really optimised away by default? By the way: Will a small source code reduction matter also a bit here? Regards, Markus