ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH 0/5 v2] Add readahead support in CoW for reflinked files.
@ 2010-07-14  7:52 Tao Ma
  2010-07-14  7:53 ` [Ocfs2-devel] [PATCH 1/5] ocfs2: pass struct file* to ocfs2_write_begin_nolock Tao Ma
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Tao Ma @ 2010-07-14  7:52 UTC (permalink / raw)
  To: ocfs2-devel

Hi all,
	When we try to CoW some clusters for a reflinked file, we have to read 
the contents first, allocate some clusters and then map these pages to 
the new clusters. Currently, we use block_read_full_page to read it, but 
it is a little bit slower.
	So this patch set try to add readahead support for CoW. Before we 
start, we call readahead first so that the pages can be read at the very 
first. And during CoW, when we find a readahead page, we know that we 
need to move the readahead window, so a new asyncreadahead is called.

I have a small test to show how readahead speed up CoW.
readahead_test()
{
MNT_DIR=/mnt/ocfs2
DEVICE=/dev/sda8
echo 'y'|mkfs.ocfs2 --fs-features=local,refcount $DEVICE
mount -t ocfs2 $DEVICE $MNT_DIR
FILE=$MNT_DIR/$RANDOM
REFLINK=$MNT_DIR/$RANDOM
dd if=/dev/zero of=$FILE bs=1M count=1000
reflink $FILE $REFLINK
dd if=/dev/zero of=$REFLINK bs=1M count=1000 conv=notrunc
umount $MNT_DIR
}

Without these patch set, the 2nd dd has a i/o speed of 22MB/s.
with the patch set, the i/o speed is increased to about 40MB/s.

Any comments are welcomed.

Regards,
Tao

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

end of thread, other threads:[~2010-08-12  3:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-14  7:52 [Ocfs2-devel] [PATCH 0/5 v2] Add readahead support in CoW for reflinked files Tao Ma
2010-07-14  7:53 ` [Ocfs2-devel] [PATCH 1/5] ocfs2: pass struct file* to ocfs2_write_begin_nolock Tao Ma
2010-07-14  7:53 ` [Ocfs2-devel] [PATCH 2/5] ocfs2: pass struct file* to ocfs2_prepare_inode_for_write Tao Ma
2010-07-14  7:53 ` [Ocfs2-devel] [PATCH 3/5] ocfs2: Add struct file to ocfs2_refcount_cow Tao Ma
2010-07-14  7:53 ` [Ocfs2-devel] [PATCH 4/5] ocfs2: Add readahead support for CoW Tao Ma
2010-07-14  7:53 ` [Ocfs2-devel] [PATCH 5/5] ocfs2: Add readhead during CoW Tao Ma
2010-07-15  2:31 ` [Ocfs2-devel] [PATCH 0/5 v2] Add readahead support in CoW for reflinked files Joel Becker
2010-07-15  3:04   ` Tao Ma
2010-08-12  2:25     ` Joel Becker
2010-08-12  3:18       ` Tao Ma

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