From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933965AbcHaM3t (ORCPT ); Wed, 31 Aug 2016 08:29:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56710 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932516AbcHaM3p (ORCPT ); Wed, 31 Aug 2016 08:29:45 -0400 Subject: Re: [PATCH 3/4] KVM-S390: Less function calls in kvm_s390_import_bp_data() after error detection To: SF Markus Elfring , Cornelia Huck References: <82b84c9c-38a4-4d17-910f-312668dbae01@users.sourceforge.net> <47f88a11-b949-28ed-5589-925888a37574@users.sourceforge.net> <20160822150048.309a3e10.cornelia.huck@de.ibm.com> <20160822213736.62f1ae29.cornelia.huck@de.ibm.com> <5da7978a-922b-8ccc-fce4-2bffffca888f@users.sourceforge.net> Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org, =?UTF-8?Q?Christian_Borntr=c3=a4ger?= , David Hildenbrand , Heiko Carstens , Martin Schwidefsky , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: Paolo Bonzini Message-ID: <57711295-6c3c-c2f3-41e3-a85a552de82b@redhat.com> Date: Wed, 31 Aug 2016 14:29:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <5da7978a-922b-8ccc-fce4-2bffffca888f@users.sourceforge.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 31 Aug 2016 12:29:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/08/2016 23:17, SF Markus Elfring wrote: >> If in doubt, the compiler will be _much_ better at optimizing >> that kind of stuff anyway. > > Which compiler (or optimizer) implementation is capable to restructure > the jump targets for you automatically in the way I propose here? If kfree were implemented as if (p) really_kfree(p); then the compiler would be able to jump over the NULL test. In principle one could also add a "does nothing if NULL" attribute to GCC and annotate kfree with it. Paolo