[PATCH]: block_read_full_page: micro optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Paul Drynoff <[email protected]>

---

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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux