From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755530AbcHVV2s (ORCPT ); Mon, 22 Aug 2016 17:28:48 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:32031 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752999AbcHVV2q (ORCPT ); Mon, 22 Aug 2016 17:28:46 -0400 X-IBM-Helo: d06dlp03.portsmouth.uk.ibm.com X-IBM-MailFrom: cornelia.huck@de.ibm.com X-IBM-RcptTo: kernel-janitors@vger.kernel.org;kvm@vger.kernel.org;linux-kernel@vger.kernel.org;linux-s390@vger.kernel.org Date: Mon, 22 Aug 2016 23:28:36 +0200 From: Cornelia Huck To: SF Markus Elfring Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org, Christian =?UTF-8?B?Qm9ybnRyw6RnZXI=?= , David Hildenbrand , Heiko Carstens , Martin Schwidefsky , Paolo Bonzini , Radim =?UTF-8?B?S3LEjW3DocWZ?= , LKML , kernel-janitors@vger.kernel.org, Julia Lawall Subject: Re: [PATCH 3/4] KVM-S390: Less function calls in kvm_s390_import_bp_data() after error detection In-Reply-To: <5da7978a-922b-8ccc-fce4-2bffffca888f@users.sourceforge.net> 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> Organization: IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz =?UTF-8?B?R2VzY2jDpGZ0c2bDvGhydW5nOg==?= Dirk Wittkopp Sitz der Gesellschaft: =?UTF-8?B?QsO2Ymxpbmdlbg==?= Registergericht: Amtsgericht Stuttgart, HRB 243294 X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16082221-0040-0000-0000-00000216C6AF X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16082221-0041-0000-0000-00002170D4E2 Message-Id: <20160822232836.1e89676f.cornelia.huck@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-22_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608220215 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Aug 2016 23:17:26 +0200 SF Markus Elfring wrote: > >>>> @@ -273,10 +273,12 @@ int kvm_s390_import_bp_data(struct kvm_vcpu *vcpu, > >>>> vcpu->arch.guestdbg.nr_hw_wp = nr_wp; > >>>> vcpu->arch.guestdbg.hw_wp_info = wp_info; > >>>> return 0; > >>>> -error: > >>>> - kfree(bp_data); > >>>> - kfree(wp_info); > >>>> +free_bp_info: > >>>> kfree(bp_info); > >>>> +free_wp_info: > >>>> + kfree(wp_info); > >>>> +free_bp_data: > >>>> + kfree(bp_data); > >>>> return ret; > >>>> } > >>>> > >>> > >>> This replaces a perfectly fine fallthrough > >> > >> The usage of a single goto label like "error" seems to be convenient. > >> But how do these habits fit to the current Linux coding style convention? > >> > >> > >>> with some horrible labels. > >> > >> Do they explain better which processing steps should be performed > >> for an efficient exception handling in this function implementation? > > > > *sigh* > > > > It's _exception handling_. It does not need to be "efficient", > > I imagine that run time situations could evolve where software efficiency > will also matter for this purpose. *major sigh* We can start to optimize error handling that should never run after we fixed every other performance problem that we have. Not earlier. > > > > it needs to be easily parsable by humans. > > I guess that we have got different preferences for this detail. And I'm maintainer for this code. > > > > 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? No, please stop right here. NACK. EOD.