Messages in this thread Patch in this message | | | Subject | [patch 5/7] uml - hostfs: avoid buffers | From | blaisorblade@yahoo ... | Date | Sun, 24 Apr 2005 20:19:19 +0200 |
| |
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Use this: .set_page_dirty = __set_page_dirty_nobuffers,
We already dropped the inclusion of <linux/buffer_head.h>, and we don't have a backing block device for this FS.
"Without having looked at it, I'm sure that hostfs does not use buffer_heads. So setting your ->set_page_dirty a_op to point at __set_page_dirty_nobuffers() is a reasonable thing to do - it'll provide a slight speedup."
This speedup is one less spinlock held and one less conditional branch, which isn't bad.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> ---
linux-2.6.12-paolo/fs/hostfs/hostfs_kern.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
diff -puN fs/hostfs/hostfs_kern.c~uml-hostfs-avoid-buffers fs/hostfs/hostfs_kern.c --- linux-2.6.12/fs/hostfs/hostfs_kern.c~uml-hostfs-avoid-buffers 2005-04-24 20:17:05.000000000 +0200 +++ linux-2.6.12-paolo/fs/hostfs/hostfs_kern.c 2005-04-24 20:17:05.000000000 +0200 @@ -521,7 +521,7 @@ int hostfs_commit_write(struct file *fil static struct address_space_operations hostfs_aops = { .writepage = hostfs_writepage, .readpage = hostfs_readpage, -/* .set_page_dirty = __set_page_dirty_nobuffers, */ + .set_page_dirty = __set_page_dirty_nobuffers, .prepare_write = hostfs_prepare_write, .commit_write = hostfs_commit_write }; _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |