linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: Take advantage of kmem_cache_zalloc() in ext4_init_io_end()
@ 2010-12-09 22:17 Jesper Juhl
  2010-12-20  2:44 ` Ted Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Jesper Juhl @ 2010-12-09 22:17 UTC (permalink / raw)
  To: linux-ext4; +Cc: linux-kernel, Theodore Ts'o, Andreas Dilger


Take advantage of kmem_cache_zalloc(). Save a memset() call in 
ext4_init_io_end() and save a few bytes.

Before:
 [jj@dragon linux-2.6]$ size fs/ext4/page-io.o
    text    data     bss     dec     hex filename
    3016       0     624    3640     e38 fs/ext4/page-io.o
After:
 [jj@dragon linux-2.6]$ size fs/ext4/page-io.o
    text    data     bss     dec     hex filename
    3000       0     624    3624     e28 fs/ext4/page-io.o


Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 page-io.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index beacce1..0f5dfe0 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -158,11 +158,8 @@ static void ext4_end_io_work(struct work_struct *work)
 
 ext4_io_end_t *ext4_init_io_end(struct inode *inode, gfp_t flags)
 {
-	ext4_io_end_t *io = NULL;

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

* Re: ext4: Take advantage of kmem_cache_zalloc() in ext4_init_io_end()
  2010-12-09 22:17 [PATCH] ext4: Take advantage of kmem_cache_zalloc() in ext4_init_io_end() Jesper Juhl
@ 2010-12-20  2:44 ` Ted Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Ted Ts'o @ 2010-12-20  2:44 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-ext4, linux-kernel, Andreas Dilger

On Thu, Dec 09, 2010 at 12:17:34PM -0000, Jesper Juhl wrote:
> Take advantage of kmem_cache_zalloc(). Save a memset() call in 
> ext4_init_io_end() and save a few bytes.
> 
> Before:
>  [jj@dragon linux-2.6]$ size fs/ext4/page-io.o
>     text    data     bss     dec     hex filename
>     3016       0     624    3640     e38 fs/ext4/page-io.o
> After:
>  [jj@dragon linux-2.6]$ size fs/ext4/page-io.o
>     text    data     bss     dec     hex filename
>     3000       0     624    3624     e28 fs/ext4/page-io.o
> 
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>

Thanks, added to the ext4 patch queue.

						- Ted

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

end of thread, other threads:[~2010-12-20  2:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-09 22:17 [PATCH] ext4: Take advantage of kmem_cache_zalloc() in ext4_init_io_end() Jesper Juhl
2010-12-20  2:44 ` Ted Ts'o

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