linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]: block_read_full_page: micro optimization
@ 2006-06-24  7:01 Paul Drynoff
  2006-06-24 23:48 ` Ray Lee
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Drynoff @ 2006-06-24  7:01 UTC (permalink / raw)
  To: akpm, viro; +Cc: linux-kernel, linux-fsdevel

I wonder, may be with such change kernel become little faster?

Signed-off-by: Paul Drynoff <pauldrynoff@gmail.com>

---

Index: linux-2.6.17-mm1/fs/buffer.c
===================================================================
--- linux-2.6.17-mm1.orig/fs/buffer.c
+++ linux-2.6.17-mm1/fs/buffer.c
@@ -2093,7 +2093,7 @@ int block_read_full_page(struct page *pa
 			}
 			if (!buffer_mapped(bh)) {
 				void *kaddr = kmap_atomic(page, KM_USER0);
-				memset(kaddr + i * blocksize, 0, blocksize);
+				memset(kaddr + (i << inode->i_blkbits), 0, blocksize);
 				flush_dcache_page(page);
 				kunmap_atomic(kaddr, KM_USER0);
 				if (!err)

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

end of thread, other threads:[~2006-06-24 23:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-24  7:01 [PATCH]: block_read_full_page: micro optimization Paul Drynoff
2006-06-24 23:48 ` Ray Lee

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