All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ceph: set io_pages bdi hint
@ 2016-12-30  5:37 Andreas Gerstmayr
  2017-01-04  3:25 ` Yan, Zheng
  0 siblings, 1 reply; 13+ messages in thread
From: Andreas Gerstmayr @ 2016-12-30  5:37 UTC (permalink / raw)
  To: ceph-devel
  Cc: andreas.gerstmayr, Andreas Gerstmayr, Yan, Zheng, Sage Weil,
	Ilya Dryomov

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@catalysts.cc>
---

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


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

end of thread, other threads:[~2017-01-11  2:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-30  5:37 [PATCH] ceph: set io_pages bdi hint Andreas Gerstmayr
2017-01-04  3:25 ` Yan, Zheng
2017-01-05 13:23   ` [PATCH v2] " Andreas Gerstmayr
2017-01-07 16:31     ` Ilya Dryomov
2017-01-09  1:54       ` Yan, Zheng
2017-01-09  9:29         ` Andreas Gerstmayr
2017-01-10  6:42           ` Yan, Zheng
2017-01-10 12:56             ` [PATCH v3] " Andreas Gerstmayr
2017-01-10 12:56               ` Andreas Gerstmayr
2017-01-10 13:17             ` [PATCH v4] " Andreas Gerstmayr
2017-01-10 13:17               ` Andreas Gerstmayr
2017-01-10 16:26               ` Jeff Layton
2017-01-11  2:43               ` Yan, Zheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.