Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1730040iog; Thu, 16 Jun 2022 12:32:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uNB8SIBXXFgcu6wcJCZ7oEYmLzMMjA0YIx5gdiZ5hnx5Lv7imKsrFvg2DV2MiAFSvqYp+4 X-Received: by 2002:a05:6402:4309:b0:42f:9ff8:3f11 with SMTP id m9-20020a056402430900b0042f9ff83f11mr8372527edc.67.1655407925276; Thu, 16 Jun 2022 12:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655407925; cv=none; d=google.com; s=arc-20160816; b=SLTLjW9NpMsvYi2k9DwLl/Oz1hiCIR25ZaUNZL7eeDzncbcpAs0o/20G/CZxxR+19j tePgIzCW/xl33Y5N4xxi9u1D8U1WQir1+WlNPV/DsJcgs0c6Uo2IUS6TELzK5aVzmgPv PZEdS7kb0yypZH30SWN0sVhlQCY4z13h8804Tyg/iYH8puUtxytNPHlme8bDVWa+yzxC y2JYe9HlQztMaxKbh05kUVs8gZV4IjNmAp1UL24nC5yStdq/LuE+nI+2uGFlP8KAZ1Wz Uxu8OnmSYwZn5uQBkkJcMXaIYIEyghShundkwrdRmVEpaIl1DXk5d84lUaabQEgeMf1J nePQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from:dkim-signature; bh=I6q4dKvk9uVUvtNALIt0GxW4LwedkxdjSmse0vN/buc=; b=qzkYKqbbCaC7xpB+16s8zd9BzV/EnzL0xePtbdOdU15KcH4q+GPWLyuR1WbJzjIinw SSZPTq46lLRE8Z8MCzI5NXFTPgEslHUkjmdcCIEvwhV6w73zbXMgoLByUlW7R5qZW29X nEOVtX1RGyTfLfhqfCs8Y10xRhCHfMfa5YI2pd8/bv8nwaEZhfoNqwAro/hiu8xIZJ1w bxht825Ed2jwWc9wuFO3o09ZXwmNyIV21G3t8048/cgj99BXFWD7UqXcvEfE0pgTOlKB 1igkXtEuoCMciPVuBlRD2HQ/ZD9c+7Ve/JnYE+qDC2hA32MLgOCu6NiEmLzZI8/oh74B 2b2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=a4lHtb9n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x21-20020aa7d395000000b0043526b96968si3201849edq.503.2022.06.16.12.31.40; Thu, 16 Jun 2022 12:32:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=a4lHtb9n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229898AbiFPTUA (ORCPT + 99 others); Thu, 16 Jun 2022 15:20:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233405AbiFPTTz (ORCPT ); Thu, 16 Jun 2022 15:19:55 -0400 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB79856384; Thu, 16 Jun 2022 12:19:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:MIME-Version:References:In-Reply-To: Message-Id:Date:Cc:To:From:content-disposition; bh=I6q4dKvk9uVUvtNALIt0GxW4LwedkxdjSmse0vN/buc=; b=a4lHtb9nA0RdHYCz392I5pzW7Z 7dDueIg5lJRJZHghoTzuh2WcLEWj/iFVWZ7du2buNlxbbs7kppmhzR8k/UhFevMj9tqbcfjKvXSU7 oNlv6BEGKDwPVIXO6lEKVfScu5Z/O0b45U9fMA65HfRM1w8y+2b12beQpS6cVpOgv5sl4u20cc3N0 d6600nKzM6LLVDIMmMmZ38tfroAoDQUi29K5nYfdtLitvCy63E+C2kJzou484Ie6lOejZyoRS6xX9 ix7tirWza1NojBC0zuixcrHtpZ0brcEBlfqoxbilcooPDgQTnUchGEKX9phfz9gKSLblLwjmwAsLq e0LKXdew==; Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1o1v1y-0092ij-U6; Thu, 16 Jun 2022 13:19:51 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.94.2) (envelope-from ) id 1o1v1w-0006Fw-Vx; Thu, 16 Jun 2022 13:19:49 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Song Liu Cc: Christoph Hellwig , Guoqing Jiang , Stephen Bates , Martin Oliveira , David Sloan , Logan Gunthorpe Date: Thu, 16 Jun 2022 13:19:45 -0600 Message-Id: <20220616191945.23935-16-logang@deltatee.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220616191945.23935-1-logang@deltatee.com> References: <20220616191945.23935-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, song@kernel.org, hch@infradead.org, guoqing.jiang@linux.dev, sbates@raithlin.com, Martin.Oliveira@eideticom.com, David.Sloan@eideticom.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Subject: [PATCH v3 15/15] md/raid5: Increase restriction on max segments per request X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The block layer defaults the maximum segments to 128, which means requests tend to get split around the 512KB depending on how many pages can be merged. There's no such restriction in the raid5 code so increase the limit to USHRT_MAX so that larger requests can be sent as one. Signed-off-by: Logan Gunthorpe --- drivers/md/raid5.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index e48c16bfe657..5723a497108a 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -8005,6 +8005,9 @@ static int raid5_run(struct mddev *mddev) */ blk_queue_max_hw_sectors(mddev->queue, RAID5_MAX_REQ_STRIPES << RAID5_STRIPE_SHIFT(conf)); + + /* No restrictions on the number of segments in the request */ + blk_queue_max_segments(mddev->queue, USHRT_MAX); } if (log_init(conf, journal_dev, raid5_has_ppl(conf))) -- 2.30.2