This patch sets the io_pages bdi hint based on the rsize mount option. Without this patch large buffered reads (request size > max readahead) are processed sequentially in chunks of the readahead size (i.e. read requests are sent out up to the readahead size, then the do_generic_file_read() function waits until the first page is received). This patch removes this cap and enables parallel reads up to the specified maximum read size mount option (rsize). Signed-off-by: Andreas Gerstmayr <andreas.gerstmayr@xxxxxxxxxxxx> --- Feedback is appreciated. Maybe we should apply a sensible default value for rsize instead of unlimited? Please note: This patch depends on commit #9491ae4, which is not yet merged in the testing branch of the ceph-client repository (this commit is included in kernel version 4.10-rc1). fs/ceph/super.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 6bd20d7..3c50477 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -952,6 +952,13 @@ static int ceph_register_bdi(struct super_block *sb, fsc->backing_dev_info.ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_SIZE; + if (fsc->mount_options->rsize) + fsc->backing_dev_info.io_pages = + (fsc->mount_options->rsize + PAGE_SIZE - 1) + >> PAGE_SHIFT; + else + fsc->backing_dev_info.io_pages = ULONG_MAX; + err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%ld", atomic_long_inc_return(&bdi_seq)); if (!err) -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html