Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1374437

Re: [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes

From Bob Peterson <rpeterso@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes
Date 2016-04-08 21:20 +0200
Message-ID <rlK6J-aw-7@gated-at.bofh.it> (permalink)
References <rlJNn-8ev-7@gated-at.bofh.it> <rlJNo-8ev-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


----- Original Message -----
> This function compiles to 522 bytes of machine code.
> 
> Error paths are not very time critical.
> 
> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
> CC: Steven Whitehouse <swhiteho@redhat.com>
> CC: Bob Peterson <rpeterso@redhat.com>
> 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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] drivers/infiniband/hw/nes/nes_verbs.c: Deinline nes_free_qp_mem, save 1072 bytes Denys Vlasenko <dvlasenk@redhat.com> - 2016-04-08 21:00 +0200
  [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes Denys Vlasenko <dvlasenk@redhat.com> - 2016-04-08 21:00 +0200
    Re: [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes Bob Peterson <rpeterso@redhat.com> - 2016-04-08 21:20 +0200
      Re: [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes Denys Vlasenko <dvlasenk@redhat.com> - 2016-04-08 21:50 +0200
    Re: [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes Bob Peterson <rpeterso@redhat.com> - 2016-04-12 18:50 +0200
  [PATCH] lockdep: Deinline register_lock_class, save 2328 bytes Denys Vlasenko <dvlasenk@redhat.com> - 2016-04-08 21:10 +0200
    [tip:locking/core] locking/lockdep: Deinline register_lock_class(),  save 2328 bytes tip-bot for Denys Vlasenko <tipbot@zytor.com> - 2016-04-13 13:40 +0200
  Re: [PATCH] drivers/infiniband/hw/nes/nes_verbs.c: Deinline  nes_free_qp_mem, save 1072 bytes Leon Romanovsky <leon@leon.nu> - 2016-04-11 07:00 +0200

csiph-web