Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2956590pxk; Mon, 21 Sep 2020 01:12:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqWfww9vF5D0efyUJOqYggXSpLXOQu2HCGoMyr99GGX1Sc+MUS/lG4tJHDwPeO/OQOzi+0 X-Received: by 2002:a05:6402:1694:: with SMTP id a20mr49946823edv.286.1600675949259; Mon, 21 Sep 2020 01:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675949; cv=none; d=google.com; s=arc-20160816; b=qdWB/n3++SeNbPiBMZNrddStBYUU19vn54M3Y+G1I8HNK+2jHwU7J+z1ZDCETLopUl PGnTU8Fr+H1N7t8LHSJgJNtgcch+RA5wZhZP6/b3mTCnO5mz1PErrnJU+OzdbYb8hWGX RoOKhEwzc1fyi0KLs4E9H8Nl5/pywBld0dsJx5nuSuGHjyIEmSpc+GVtnYPjXnzmElp9 M7V+gvICmKll9vP7WhCCWCaE3F2uVS3IvQKdTFQVmgWvoK62ZuDYzcYGKjZVCaeTtumH z/Bp44A7TYDUTYbkizlxCtPOY1GAmeXfZd1xl19xqF7QsoSe77uH6x000daawVkwh4uT sXsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0OOdgaAy3T3TNy//04c+F/LGQuoAdpgJ6oUz9lUQkEY=; b=R6juWKXi7ABjuMPPSS+Ysbm1fG3iPHXxIusP7aUjulpEw+GcY1JPrVmOpLf+IgM1s1 yTW06F4uIiEb0m4HhLvCVOAlk9Ll1e+f2HptXbN+z6bKz5WDlkYbq2E1ogi8H2h9/er2 juWrIeeFG3kFd71MaxKSl16aXUYztzq3eyYgb62UQ3C5heAkf4U3vIIEKouqCF3HWics xyo0BZRuSo+6QVpGVXVykfXSlvezcQiqs8uyHUwZ9NN0TyxiAC5OEKrG8p11GcTxYNfN N24BL5/3bQ4S92MwXDx+EorqAJTW+zIT4k7be1EJqYd0w+WTE3fGke0uWSRhNTggKSZq t8/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=e4VccTgJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si9847581ejn.597.2020.09.21.01.12.06; Mon, 21 Sep 2020 01:12:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=e4VccTgJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbgIUIJk (ORCPT + 99 others); Mon, 21 Sep 2020 04:09:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726326AbgIUIHz (ORCPT ); Mon, 21 Sep 2020 04:07:55 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D10EC0613CF; Mon, 21 Sep 2020 01:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=0OOdgaAy3T3TNy//04c+F/LGQuoAdpgJ6oUz9lUQkEY=; b=e4VccTgJdsmgociGEt21mGtHzd j/wvJ+RKs2rthlH7WbxjsU3UE3YworJ72pCUYBShrtvn78245jQHUBPW5VY/yclvncAGnaR1CDFyB 5YoUDtHn/bM3Ija7U1Rn30aCukN1F28OsBlCk9p7r07WRJhxLkyaE9OqS16u/V6bGi5Ft+2lIzHem QnW3s68Lbh4TWGJliPqo6mN0zRJjEUxU8ZwB8+5fDPYSo2YWLMxmCt231I+dw1ngD9wpqbgEg1O8q zXYulN81iweBnS8GzCrg1zUL6XtbpqXW0Bob/ov2w3dmM5WSAbHxw9GfqozABq6wA45T7JSsJDq3H 9Bxczeag==; Received: from p4fdb0c34.dip0.t-ipconnect.de ([79.219.12.52] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKGrH-0006Wl-Rc; Mon, 21 Sep 2020 08:07:36 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Song Liu , Hans de Goede , Coly Li , Richard Weinberger , Minchan Kim , Johannes Thumshirn , Justin Sanders , linux-mtd@lists.infradead.org, dm-devel@redhat.com, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com, linux-raid@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org Subject: [PATCH 04/13] aoe: set an optimal I/O size Date: Mon, 21 Sep 2020 10:07:25 +0200 Message-Id: <20200921080734.452759-5-hch@lst.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921080734.452759-1-hch@lst.de> References: <20200921080734.452759-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org aoe forces a larger readahead size, but any reason to do larger I/O is not limited to readahead. Also set the optimal I/O size, and remove the local constants in favor of just using SZ_2G. Signed-off-by: Christoph Hellwig --- drivers/block/aoe/aoeblk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index 5ca7216e9e01f3..d8cfc233e64b93 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c @@ -347,7 +347,6 @@ aoeblk_gdalloc(void *vp) mempool_t *mp; struct request_queue *q; struct blk_mq_tag_set *set; - enum { KB = 1024, MB = KB * KB, READ_AHEAD = 2 * MB, }; ulong flags; int late = 0; int err; @@ -407,7 +406,8 @@ aoeblk_gdalloc(void *vp) WARN_ON(d->gd); WARN_ON(d->flags & DEVFL_UP); blk_queue_max_hw_sectors(q, BLK_DEF_MAX_SECTORS); - q->backing_dev_info->ra_pages = READ_AHEAD / PAGE_SIZE; + q->backing_dev_info->ra_pages = SZ_2M / PAGE_SIZE; + blk_queue_io_opt(q, SZ_2M); d->bufpool = mp; d->blkq = gd->queue = q; q->queuedata = d; -- 2.28.0