public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] XFS: Pagecache usage optimization on XFS
@ 2009-03-04  2:50 Hisashi Hifumi
  2009-03-16  9:16 ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Hisashi Hifumi @ 2009-03-04  2:50 UTC (permalink / raw)
  To: xfs-masters, xfs

Hi.

I introduced "is_partially_uptodate" aops for XFS.

A page can have multiple buffers and even if a page is not uptodate, some buffers 
can be uptodate on pagesize != blocksize environment.
This aops checks that all buffers which correspond to a part of a file 
that we want to read are uptodate. If so, we do not have to issue actual 
read IO to HDD even if a page is not uptodate because the portion we 
want to read are uptodate. 
"block_is_partially_uptodate" function is already used by ext2/3/4.
With the following patch random read/write mixed workloads or random read after 
random write workloads can be optimized and we can get performance improvement.

I did a performance test using the sysbench.

#sysbench --num-threads=4 --max-requests=100000 --test=fileio --file-num=1 
--file-block-size=8K --file-total-size=1G --file-test-mode=rndrw --file-fsync-freq=0 
--file-rw-ratio=0.5 run

-2.6.29-rc6
Test execution summary:
    total time:                          123.8645s
    total number of events:              100000
    total time taken by event execution: 442.4994
    per-request statistics:
         min:                            0.0000s
         avg:                            0.0044s
         max:                            0.3387s
         approx.  95 percentile:         0.0118s


-2.6.29-rc6-patched
Test execution summary:
    total time:                          108.0757s
    total number of events:              100000
    total time taken by event execution: 417.7505
    per-request statistics:
         min:                            0.0000s
         avg:                            0.0042s
         max:                            0.3217s
         approx.  95 percentile:         0.0118s


arch: ia64
pagesize: 16k
blocksize: 4k


Please merge following patch.
Thanks.

Signed-off-by: Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>

diff -Nrup linux-2.6.29-rc6.org/fs/xfs/linux-2.6/xfs_aops.c linux-2.6.29-rc6.xfs/fs/xfs/linux-2.6/xfs_aops.c
--- linux-2.6.29-rc6.org/fs/xfs/linux-2.6/xfs_aops.c	2009-03-02 09:26:08.000000000 +0900
+++ linux-2.6.29-rc6.xfs/fs/xfs/linux-2.6/xfs_aops.c	2009-03-04 10:26:21.000000000 +0900
@@ -1623,4 +1623,5 @@ const struct address_space_operations xf
 	.bmap			= xfs_vm_bmap,
 	.direct_IO		= xfs_vm_direct_IO,
 	.migratepage		= buffer_migrate_page,
+	.is_partially_uptodate  = block_is_partially_uptodate,
 };

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] XFS: Pagecache usage optimization on XFS
  2009-03-04  2:50 [PATCH] XFS: Pagecache usage optimization on XFS Hisashi Hifumi
@ 2009-03-16  9:16 ` Christoph Hellwig
  2009-03-17  4:03   ` Hisashi Hifumi
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2009-03-16  9:16 UTC (permalink / raw)
  To: Hisashi Hifumi; +Cc: xfs-masters, xfs

This looks like it should work.  did you run XFSQA on a small blocksize
filesystem with this applied?

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] XFS: Pagecache usage optimization on XFS
  2009-03-16  9:16 ` Christoph Hellwig
@ 2009-03-17  4:03   ` Hisashi Hifumi
  2009-03-17  6:42     ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Hisashi Hifumi @ 2009-03-17  4:03 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs-masters, xfs


At 18:16 09/03/16, Christoph Hellwig wrote:
>This looks like it should work.  did you run XFSQA on a small blocksize
>filesystem with this applied?

Hi.
I did XFSQA test on XFS partition with this patch applied.

arch:ia64
pagesize:16K
blocksize:2K

The result of XFSQA test 001~ 202 except 182 was OK. 
It was discussed about the failure of test 182 as follows.
http://marc.info/?l=linux-fsdevel&m=122535673232638&w=2
Subject:    do_sync() and XFSQA test 182 failures....

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] XFS: Pagecache usage optimization on XFS
  2009-03-17  4:03   ` Hisashi Hifumi
@ 2009-03-17  6:42     ` Christoph Hellwig
  2009-03-17 15:19       ` Felix Blyakher
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2009-03-17  6:42 UTC (permalink / raw)
  To: Hisashi Hifumi; +Cc: Christoph Hellwig, xfs-masters, xfs

On Tue, Mar 17, 2009 at 01:03:08PM +0900, Hisashi Hifumi wrote:
> 
> At 18:16 09/03/16, Christoph Hellwig wrote:
> >This looks like it should work.  did you run XFSQA on a small blocksize
> >filesystem with this applied?
> 
> Hi.
> I did XFSQA test on XFS partition with this patch applied.
> 
> arch:ia64
> pagesize:16K
> blocksize:2K

Thanks a lot.  In that case the patch is fine with me.


Reviewed-by: Christoph Hellwig <hch@lst.de>

(as in reviewing the generic function to make sense with XFS :))

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: [PATCH] XFS: Pagecache usage optimization on XFS
  2009-03-17  6:42     ` Christoph Hellwig
@ 2009-03-17 15:19       ` Felix Blyakher
  0 siblings, 0 replies; 5+ messages in thread
From: Felix Blyakher @ 2009-03-17 15:19 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs-masters, Hisashi Hifumi, xfs


On Mar 17, 2009, at 1:42 AM, Christoph Hellwig wrote:

> On Tue, Mar 17, 2009 at 01:03:08PM +0900, Hisashi Hifumi wrote:
>>
>> At 18:16 09/03/16, Christoph Hellwig wrote:
>>> This looks like it should work.  did you run XFSQA on a small  
>>> blocksize
>>> filesystem with this applied?
>>
>> Hi.
>> I did XFSQA test on XFS partition with this patch applied.
>>
>> arch:ia64
>> pagesize:16K
>> blocksize:2K
>
> Thanks a lot.  In that case the patch is fine with me.
>
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> (as in reviewing the generic function to make sense with XFS :))

Make sense to me too.

Reviewed-by: Felix Blyakher <felixb@sgi.com>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2009-03-17 15:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-04  2:50 [PATCH] XFS: Pagecache usage optimization on XFS Hisashi Hifumi
2009-03-16  9:16 ` Christoph Hellwig
2009-03-17  4:03   ` Hisashi Hifumi
2009-03-17  6:42     ` Christoph Hellwig
2009-03-17 15:19       ` Felix Blyakher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox