diff options
author | Namjae Jeon <linkinjeon@gmail.com> | 2012-08-31 12:49:07 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2012-09-03 18:06:26 -0400 |
commit | 378b8e1ad18e7c97832aa3771e295153c4cd2a55 (patch) | |
tree | c1de0d655ff0fb49ea27459a6a791f0f8ce47563 /fs | |
parent | e4230108547766f4e105a62c45f3724309106f91 (diff) |
udf: add writepages support for udf
Use mpage_writepages() instead of multiple calls to udf_writepage()
to make performance higher.
*Write Speed with writepage() =
RecSize ReadSpeed WriteSpeed RanReadSpeed RanWriteSpeed
10485760 0.00MB/sec 8.56MB/sec 0.00MB/sec 8.20MB/sec
1048576 0.00MB/sec 8.57MB/sec 0.00MB/sec 6.42MB/sec
524288 0.00MB/sec 8.59MB/sec 0.00MB/sec 5.24MB/sec
262144 0.00MB/sec 8.59MB/sec 0.00MB/sec 4.17MB/sec
131072 0.00MB/sec 8.53MB/sec 0.00MB/sec 3.32MB/sec
65536 0.00MB/sec 8.49MB/sec 0.00MB/sec 2.31MB/sec
*Write Speed with writepages()
RecSize ReadSpeed WriteSpeed RanReadSpeed RanWriteSpeed
10485760 0.00MB/sec 9.88MB/sec 0.00MB/sec 9.60MB/sec
1048576 0.00MB/sec 9.95MB/sec 0.00MB/sec 7.52MB/sec
524288 0.00MB/sec 9.98MB/sec 0.00MB/sec 6.16MB/sec
262144 0.00MB/sec 9.90MB/sec 0.00MB/sec 4.98MB/sec
131072 0.00MB/sec 9.89MB/sec 0.00MB/sec 3.78MB/sec
65536 0.00MB/sec 9.81MB/sec 0.00MB/sec 2.50MB/sec
There is about 1.4MB/sec speed improvement over 8.5MB/sec,
which comes out around 16% improvement.
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Ashish Sangwan <ashish.sangwan2@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/udf/inode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index aa233469b3c1..1a0588e77a2f 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -100,6 +100,12 @@ static int udf_writepage(struct page *page, struct writeback_control *wbc) | |||
100 | return block_write_full_page(page, udf_get_block, wbc); | 100 | return block_write_full_page(page, udf_get_block, wbc); |
101 | } | 101 | } |
102 | 102 | ||
103 | static int udf_writepages(struct address_space *mapping, | ||
104 | struct writeback_control *wbc) | ||
105 | { | ||
106 | return mpage_writepages(mapping, wbc, udf_get_block); | ||
107 | } | ||
108 | |||
103 | static int udf_readpage(struct file *file, struct page *page) | 109 | static int udf_readpage(struct file *file, struct page *page) |
104 | { | 110 | { |
105 | return mpage_readpage(page, udf_get_block); | 111 | return mpage_readpage(page, udf_get_block); |
@@ -145,6 +151,7 @@ const struct address_space_operations udf_aops = { | |||
145 | .readpage = udf_readpage, | 151 | .readpage = udf_readpage, |
146 | .readpages = udf_readpages, | 152 | .readpages = udf_readpages, |
147 | .writepage = udf_writepage, | 153 | .writepage = udf_writepage, |
154 | .writepages = udf_writepages, | ||
148 | .write_begin = udf_write_begin, | 155 | .write_begin = udf_write_begin, |
149 | .write_end = generic_write_end, | 156 | .write_end = generic_write_end, |
150 | .bmap = udf_bmap, | 157 | .bmap = udf_bmap, |