Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1fca3a05 authored by Hisashi Hifumi's avatar Hisashi Hifumi Committed by Mark Fasheh
Browse files

ocfs2: Pagecache usage optimization on ocfs2



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.

Signed-off-by: default avatarHisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent 6ca497a8
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -1967,4 +1967,5 @@ const struct address_space_operations ocfs2_aops = {
	.invalidatepage		= ocfs2_invalidatepage,
	.releasepage		= ocfs2_releasepage,
	.migratepage		= buffer_migrate_page,
	.is_partially_uptodate	= block_is_partially_uptodate,
};