xfs: pagecache usage optimization

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, April 3, 2009 - 11:07 am

Gitweb:     http://git.kernel.org/linus/bddaafa11a549fff311bcf2e04bbfb5139812cb7
Commit:     bddaafa11a549fff311bcf2e04bbfb5139812cb7
Parent:     6447c36209c4268352d55d04d041396ebb8add4a
Author:     Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
AuthorDate: Sun Mar 29 09:53:38 2009 +0200
Committer:  Christoph Hellwig <hch@brick.lst.de>
CommitDate: Sun Mar 29 09:53:38 2009 +0200

    xfs: pagecache usage optimization
    
    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
    
    Signed-off-by: Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Reviewed-by: Felix Blyakher <felixb@sgi.com>
---
 fs/xfs/linux-2.6/xfs_aops.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c
index de3a198..c13f673 100644
--- a/fs/xfs/linux-2.6/xfs_aops.c
+++ b/fs/xfs/linux-2.6/xfs_aops.c
@@ -1623,4 +1623,5 @@ const struct address_space_operations xfs_address_space_operations = {
 	.bmap			= xfs_vm_bmap,
 	.direct_IO		= xfs_vm_direct_IO,
 	.migratepage		= buffer_migrate_page,
+	.is_partially_uptodate  = block_is_partially_uptodate,
 };
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
xfs: pagecache usage optimization, Linux Kernel Mailing ..., (Fri Apr 3, 11:07 am)