[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57711295-6c3c-c2f3-41e3-a85a552de82b@redhat.com>
Date: Wed, 31 Aug 2016 14:29:41 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>,
Cornelia Huck <cornelia.huck@...ibm.com>
Cc: kvm@...r.kernel.org, linux-s390@...r.kernel.org,
Christian Bornträger <borntraeger@...ibm.com>,
David Hildenbrand <dahi@...ux.vnet.ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Radim Krčmář <rkrcmar@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH 3/4] KVM-S390: Less function calls in
kvm_s390_import_bp_data() after error detection
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
Powered by blists - more mailing lists