linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] direct-io: Deinline submit_page_section, save 5304 bytes
@ 2016-03-13 21:00 Denys Vlasenko
  2016-03-13 21:00 ` [PATCH] direct-io: Deinline dio_zero_block, save 2684 bytes Denys Vlasenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Denys Vlasenko @ 2016-03-13 21:00 UTC (permalink / raw)
  To: Al Viro; +Cc: Denys Vlasenko, Jens Axboe, Christoph Hellwig, linux-kernel

This function compiles to 2628 bytes, 2 callsites

   text	   data	    bss	    dec	    hex	filename
  15197	     16	      0	  15213	   3b6d	direct-io.o.before1
   9655	     16	      0	   9671	   25c7	direct-io.o

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Al Viro <viro@zeniv.linux.org.uk>
CC: Jens Axboe <axboe@fb.com>
CC: Christoph Hellwig <hch@lst.de>
CC: linux-kernel@vger.kernel.org
---
 fs/direct-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/direct-io.c b/fs/direct-io.c
index d6a9012..21ec685 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -774,7 +774,7 @@ out:
  * If that doesn't work out then we put the old page into the bio and add this
  * page to the dio instead.
  */
-static inline int
+static int
 submit_page_section(struct dio *dio, struct dio_submit *sdio, struct page *page,
 		    unsigned offset, unsigned len, sector_t blocknr,
 		    struct buffer_head *map_bh)
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] direct-io: Deinline dio_zero_block, save 2684 bytes
  2016-03-13 21:00 [PATCH] direct-io: Deinline submit_page_section, save 5304 bytes Denys Vlasenko
@ 2016-03-13 21:00 ` Denys Vlasenko
  2016-03-14 14:37   ` Jeff Moyer
  2016-03-13 21:00 ` [PATCH] direct-io: Deinline dio_send_cur_page, save ~2000 bytes Denys Vlasenko
  2016-03-14 14:36 ` [PATCH] direct-io: Deinline submit_page_section, save 5304 bytes Jeff Moyer
  2 siblings, 1 reply; 6+ messages in thread
From: Denys Vlasenko @ 2016-03-13 21:00 UTC (permalink / raw)
  To: Al Viro; +Cc: Denys Vlasenko, Jens Axboe, Christoph Hellwig, linux-kernel

This function compiles to 2684 bytes, 2 callsites

   text	   data	    bss	    dec	    hex	filename
   9655	     16	      0	   9671	   25c7	direct-io.o.before2
   9559	     16	      0	   9575	   2567	direct-io.o

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Al Viro <viro@zeniv.linux.org.uk>
CC: Jens Axboe <axboe@fb.com>
CC: Christoph Hellwig <hch@lst.de>
CC: linux-kernel@vger.kernel.org
---
 fs/direct-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/direct-io.c b/fs/direct-io.c
index 21ec685..729c902 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -857,7 +857,7 @@ static void clean_blockdev_aliases(struct dio *dio, struct buffer_head *map_bh)
  * `end' is zero if we're doing the start of the IO, 1 at the end of the
  * IO.
  */
-static inline void dio_zero_block(struct dio *dio, struct dio_submit *sdio,
+static void dio_zero_block(struct dio *dio, struct dio_submit *sdio,
 		int end, struct buffer_head *map_bh)
 {
 	unsigned dio_blocks_per_fs_block;
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] direct-io: Deinline dio_send_cur_page, save ~2000 bytes
  2016-03-13 21:00 [PATCH] direct-io: Deinline submit_page_section, save 5304 bytes Denys Vlasenko
  2016-03-13 21:00 ` [PATCH] direct-io: Deinline dio_zero_block, save 2684 bytes Denys Vlasenko
@ 2016-03-13 21:00 ` Denys Vlasenko
  2016-03-14 14:37   ` Jeff Moyer
  2016-03-14 14:36 ` [PATCH] direct-io: Deinline submit_page_section, save 5304 bytes Jeff Moyer
  2 siblings, 1 reply; 6+ messages in thread
From: Denys Vlasenko @ 2016-03-13 21:00 UTC (permalink / raw)
  To: Al Viro; +Cc: Denys Vlasenko, Jens Axboe, Christoph Hellwig, linux-kernel

This function compiles to 1070 bytes, 2 callsites

   text	   data	    bss	    dec	    hex	filename
   9559	     16	      0	   9575	   2567	direct-io.o.before3
   7587	     16	      0	   7603	   1db3	direct-io.o

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Al Viro <viro@zeniv.linux.org.uk>
CC: Jens Axboe <axboe@fb.com>
CC: Christoph Hellwig <hch@lst.de>
CC: linux-kernel@vger.kernel.org
---
 fs/direct-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/direct-io.c b/fs/direct-io.c
index 729c902..469baf7 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -710,7 +710,7 @@ static inline int dio_bio_add_page(struct dio_submit *sdio)
  * The caller of this function is responsible for removing cur_page from the
  * dio, and for dropping the refcount which came from that presence.
  */
-static inline int dio_send_cur_page(struct dio *dio, struct dio_submit *sdio,
+static int dio_send_cur_page(struct dio *dio, struct dio_submit *sdio,
 		struct buffer_head *map_bh)
 {
 	int ret = 0;
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] direct-io: Deinline submit_page_section, save 5304 bytes
  2016-03-13 21:00 [PATCH] direct-io: Deinline submit_page_section, save 5304 bytes Denys Vlasenko
  2016-03-13 21:00 ` [PATCH] direct-io: Deinline dio_zero_block, save 2684 bytes Denys Vlasenko
  2016-03-13 21:00 ` [PATCH] direct-io: Deinline dio_send_cur_page, save ~2000 bytes Denys Vlasenko
@ 2016-03-14 14:36 ` Jeff Moyer
  2 siblings, 0 replies; 6+ messages in thread
From: Jeff Moyer @ 2016-03-14 14:36 UTC (permalink / raw)
  To: Denys Vlasenko; +Cc: Al Viro, Jens Axboe, Christoph Hellwig, linux-kernel

Denys Vlasenko <dvlasenk@redhat.com> writes:

> This function compiles to 2628 bytes, 2 callsites
>
>    text	   data	    bss	    dec	    hex	filename
>   15197	     16	      0	  15213	   3b6d	direct-io.o.before1
>    9655	     16	      0	   9671	   25c7	direct-io.o

And what is the consequence for performance?  If you look at the git
history for this file, you'll find the commit that introduced the
inline:

commit ba253fbf6d3502c54e1ac8792e7ac8290a1f5b8d
Author: Andi Kleen <ak@linux.intel.com>
Date:   Mon Aug 1 21:38:08 2011 -0700

    direct-io: inline the complete submission path
    
    Add inlines to all the submission path functions. While this increases
    code size it also gives gcc a lot of optimization opportunities
    in this critical hotpath.

    ...

So you're essentially undoing that work.

NAK

Cheers,
Jeff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] direct-io: Deinline dio_zero_block, save 2684 bytes
  2016-03-13 21:00 ` [PATCH] direct-io: Deinline dio_zero_block, save 2684 bytes Denys Vlasenko
@ 2016-03-14 14:37   ` Jeff Moyer
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Moyer @ 2016-03-14 14:37 UTC (permalink / raw)
  To: Denys Vlasenko; +Cc: Al Viro, Jens Axboe, Christoph Hellwig, linux-kernel

Denys Vlasenko <dvlasenk@redhat.com> writes:

> This function compiles to 2684 bytes, 2 callsites
>
>    text	   data	    bss	    dec	    hex	filename
>    9655	     16	      0	   9671	   25c7	direct-io.o.before2
>    9559	     16	      0	   9575	   2567	direct-io.o

NAK

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] direct-io: Deinline dio_send_cur_page, save ~2000 bytes
  2016-03-13 21:00 ` [PATCH] direct-io: Deinline dio_send_cur_page, save ~2000 bytes Denys Vlasenko
@ 2016-03-14 14:37   ` Jeff Moyer
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Moyer @ 2016-03-14 14:37 UTC (permalink / raw)
  To: Denys Vlasenko; +Cc: Al Viro, Jens Axboe, Christoph Hellwig, linux-kernel

Denys Vlasenko <dvlasenk@redhat.com> writes:

> This function compiles to 1070 bytes, 2 callsites
>
>    text	   data	    bss	    dec	    hex	filename
>    9559	     16	      0	   9575	   2567	direct-io.o.before3
>    7587	     16	      0	   7603	   1db3	direct-io.o

NAK

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-03-14 14:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-13 21:00 [PATCH] direct-io: Deinline submit_page_section, save 5304 bytes Denys Vlasenko
2016-03-13 21:00 ` [PATCH] direct-io: Deinline dio_zero_block, save 2684 bytes Denys Vlasenko
2016-03-14 14:37   ` Jeff Moyer
2016-03-13 21:00 ` [PATCH] direct-io: Deinline dio_send_cur_page, save ~2000 bytes Denys Vlasenko
2016-03-14 14:37   ` Jeff Moyer
2016-03-14 14:36 ` [PATCH] direct-io: Deinline submit_page_section, save 5304 bytes Jeff Moyer

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).