From patchwork Sat Jul 23 00:02:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sage Weil X-Patchwork-Id: 1001462 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6N08HNw032329 for ; Sat, 23 Jul 2011 00:16:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751307Ab1GWAGG (ORCPT ); Fri, 22 Jul 2011 20:06:06 -0400 Received: from cobra.newdream.net ([66.33.216.30]:44317 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753985Ab1GWAFz (ORCPT ); Fri, 22 Jul 2011 20:05:55 -0400 Received: from localhost.localdomain (ip-64-111-111-107.dreamhost.com [64.111.111.107]) by cobra.newdream.net (Postfix) with ESMTPA id 3DD83BC964; Fri, 22 Jul 2011 17:09:38 -0700 (PDT) From: Sage Weil To: ceph-devel@vger.kernel.org Cc: Yehuda Sadeh Subject: [PATCH 14/23] ceph: set up readahead size when rsize is not passed Date: Fri, 22 Jul 2011 17:02:53 -0700 Message-Id: <1311379382-9218-15-git-send-email-sage@newdream.net> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1311379382-9218-1-git-send-email-sage@newdream.net> References: <1311379382-9218-1-git-send-email-sage@newdream.net> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 23 Jul 2011 00:16:11 +0000 (UTC) From: Yehuda Sadeh This should improve the default read performance, as without it readahead is practically disabled. Signed-off-by: Yehuda Sadeh --- fs/ceph/super.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/fs/ceph/super.c b/fs/ceph/super.c index d4757c9..d47c5ec 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -779,6 +779,10 @@ static int ceph_register_bdi(struct super_block *sb, fsc->backing_dev_info.ra_pages = (fsc->mount_options->rsize + PAGE_CACHE_SIZE - 1) >> PAGE_SHIFT; + else + fsc->backing_dev_info.ra_pages = + default_backing_dev_info.ra_pages; + err = bdi_register(&fsc->backing_dev_info, NULL, "ceph-%d", atomic_long_inc_return(&bdi_seq)); if (!err)