linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] udf: add writepages support for udf
@ 2012-08-31 16:49 Namjae Jeon
  2012-09-03 12:45 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Namjae Jeon @ 2012-08-31 16:49 UTC (permalink / raw)
  To: jack; +Cc: linux-kernel, Namjae Jeon, Ashish Sangwan

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,
whcih comes out around 16% improvement.

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Ashish Sangwan <ashish.sangwan2@gmail.com>
---
 fs/udf/inode.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index aa23346..1a0588e 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)
 	return block_write_full_page(page, udf_get_block, wbc);
 }
 
+static int udf_writepages(struct address_space *mapping,
+			struct writeback_control *wbc)
+{
+	return mpage_writepages(mapping, wbc, udf_get_block);
+}
+
 static int udf_readpage(struct file *file, struct page *page)
 {
 	return mpage_readpage(page, udf_get_block);
@@ -145,6 +151,7 @@ const struct address_space_operations udf_aops = {
 	.readpage	= udf_readpage,
 	.readpages	= udf_readpages,
 	.writepage	= udf_writepage,
+	.writepages	= udf_writepages,
 	.write_begin		= udf_write_begin,
 	.write_end		= generic_write_end,
 	.bmap		= udf_bmap,
-- 
1.7.9.5


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

* Re: [PATCH] udf: add writepages support for udf
  2012-08-31 16:49 [PATCH] udf: add writepages support for udf Namjae Jeon
@ 2012-09-03 12:45 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2012-09-03 12:45 UTC (permalink / raw)
  To: Namjae Jeon; +Cc: jack, linux-kernel, Ashish Sangwan

On Fri 31-08-12 12:49:07, Namjae Jeon wrote:
> 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,
> whcih comes out around 16% improvement.
  Nice. I've added the patch to my tree. Thanks.

								Honza
> 
> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
> Signed-off-by: Ashish Sangwan <ashish.sangwan2@gmail.com>
> ---
>  fs/udf/inode.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/fs/udf/inode.c b/fs/udf/inode.c
> index aa23346..1a0588e 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)
>  	return block_write_full_page(page, udf_get_block, wbc);
>  }
>  
> +static int udf_writepages(struct address_space *mapping,
> +			struct writeback_control *wbc)
> +{
> +	return mpage_writepages(mapping, wbc, udf_get_block);
> +}
> +
>  static int udf_readpage(struct file *file, struct page *page)
>  {
>  	return mpage_readpage(page, udf_get_block);
> @@ -145,6 +151,7 @@ const struct address_space_operations udf_aops = {
>  	.readpage	= udf_readpage,
>  	.readpages	= udf_readpages,
>  	.writepage	= udf_writepage,
> +	.writepages	= udf_writepages,
>  	.write_begin		= udf_write_begin,
>  	.write_end		= generic_write_end,
>  	.bmap		= udf_bmap,
> -- 
> 1.7.9.5
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

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

end of thread, other threads:[~2012-09-03 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 16:49 [PATCH] udf: add writepages support for udf Namjae Jeon
2012-09-03 12:45 ` Jan Kara

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