* [Cluster-devel] [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes
[not found] <1460141926-13069-1-git-send-email-dvlasenk@redhat.com>
@ 2016-04-08 18:58 ` Denys Vlasenko
2016-04-08 19:17 ` Bob Peterson
2016-04-12 16:49 ` Bob Peterson
0 siblings, 2 replies; 4+ messages in thread
From: Denys Vlasenko @ 2016-04-08 18:58 UTC (permalink / raw)
To: cluster-devel.redhat.com
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 at redhat.com
CC: linux-kernel at 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Cluster-devel] [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes
2016-04-08 18:58 ` [Cluster-devel] [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes Denys Vlasenko
@ 2016-04-08 19:17 ` Bob Peterson
2016-04-08 19:46 ` Denys Vlasenko
2016-04-12 16:49 ` Bob Peterson
1 sibling, 1 reply; 4+ messages in thread
From: Bob Peterson @ 2016-04-08 19:17 UTC (permalink / raw)
To: cluster-devel.redhat.com
----- 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 at redhat.com
> CC: linux-kernel at 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Cluster-devel] [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes
2016-04-08 19:17 ` Bob Peterson
@ 2016-04-08 19:46 ` Denys Vlasenko
0 siblings, 0 replies; 4+ messages in thread
From: Denys Vlasenko @ 2016-04-08 19:46 UTC (permalink / raw)
To: cluster-devel.redhat.com
On 04/08/2016 09:17 PM, Bob Peterson wrote:
> ----- Original Message -----
>> This function compiles to 522 bytes of machine code.
>>
> Is there a reason why you want to trade memory for speed? Are you
> optimizing for memory on an embedded device or something?
Yes. I did a scan for really large inlines and this function came up.
If you feel it is indeed performance critical, please ignore my patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Cluster-devel] [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes
2016-04-08 18:58 ` [Cluster-devel] [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes Denys Vlasenko
2016-04-08 19:17 ` Bob Peterson
@ 2016-04-12 16:49 ` Bob Peterson
1 sibling, 0 replies; 4+ messages in thread
From: Bob Peterson @ 2016-04-12 16:49 UTC (permalink / raw)
To: cluster-devel.redhat.com
----- 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 at redhat.com
> CC: linux-kernel at 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,
Thanks. This is now applied to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/cgit/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=a527b38e1475211b67eb59b3fadb40689f035529
Regards,
Bob Peterson
Red Hat File Systems
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-04-12 16:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1460141926-13069-1-git-send-email-dvlasenk@redhat.com>
2016-04-08 18:58 ` [Cluster-devel] [PATCH] fs/gfs2/glock.c: Deinline do_error, save 1856 bytes Denys Vlasenko
2016-04-08 19:17 ` Bob Peterson
2016-04-08 19:46 ` Denys Vlasenko
2016-04-12 16:49 ` Bob Peterson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).