Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758878AbcDHTSB (ORCPT ); Fri, 8 Apr 2016 15:18:01 -0400 Received: from mx5-phx2.redhat.com ([209.132.183.37]:33074 "EHLO mx5-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908AbcDHTSA (ORCPT ); Fri, 8 Apr 2016 15:18:00 -0400 Date: Fri, 8 Apr 2016 15:17:58 -0400 (EDT) From: Bob Peterson To: Denys Vlasenko Cc: Steven Whitehouse , cluster-devel@redhat.com, linux-kernel@vger.kernel.org Message-ID: <1824612152.49246801.1460143078420.JavaMail.zimbra@redhat.com> In-Reply-To: <1460141926-13069-4-git-send-email-dvlasenk@redhat.com> References: <1460141926-13069-1-git-send-email-dvlasenk@redhat.com> <1460141926-13069-4-git-send-email-dvlasenk@redhat.com> Subject: Re: [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.3.113.25] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF45 (Linux)/8.0.6_GA_5922) Thread-Topic: fs/gfs2/glock.c: Deinline do_error, save 1856 bytes Thread-Index: Va/8mGPdzEhq1Iis00f6eCD9YotJAg== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1364 Lines: 47 ----- Original Message ----- > This function compiles to 522 bytes of machine code. > > Error paths are not very time critical. > > Signed-off-by: Denys Vlasenko > CC: Steven Whitehouse > CC: Bob Peterson > CC: cluster-devel@redhat.com > CC: linux-kernel@vger.kernel.org > --- > fs/gfs2/glock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c > index 6539131..c3d5172 100644 > --- a/fs/gfs2/glock.c > +++ b/fs/gfs2/glock.c > @@ -218,7 +218,7 @@ static void gfs2_holder_wake(struct gfs2_holder *gh) > * > */ > > -static inline void do_error(struct gfs2_glock *gl, const int ret) > +static void do_error(struct gfs2_glock *gl, const int ret) > { > struct gfs2_holder *gh, *tmp; > > -- > 2.1.0 > > Hi Denys, The name is misleading. Function do_error() isn't really an error path. Its job is to "fail" all the holders for a glock that are doing a "try" lock in cases where trying the lock has been determined to have failed. Is there a reason why you want to trade memory for speed? Are you optimizing for memory on an embedded device or something? I guess I have no fundamental problem in adding this patch, but perhaps Steve or someone can offer a second opinion before I do. Regards, Bob Peterson Red Hat File Systems