Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1178540rdf; Wed, 22 Nov 2023 07:34:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5o04sZV1Cl/OoxY41aIr/SimrqKRTtk+3rUsnS3ZeVGM2bhuap2dpmGUZegrA6ar63H4z X-Received: by 2002:a05:6808:190e:b0:3b8:44dc:7ce0 with SMTP id bf14-20020a056808190e00b003b844dc7ce0mr985126oib.2.1700667262659; Wed, 22 Nov 2023 07:34:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700667262; cv=none; d=google.com; s=arc-20160816; b=hSJHC1KlreI45xFEzWpR//CXX3zekdpeseBUPp9LX5VXi91vrVPgExVU1Rrb7CZdE4 4PdVN8dG1WvBOPbAmeeBfm+oTwd5j5ivn2jlUOioTttqDqKRt5ORGrz3VCFD/CI1Z7ut p7rvNkPsdQk5lugyWT8J8uW00G4TxH49XkXfkLQ1pHcyP7fGJBcF4DoR6m0ENj5JKJfL ublTxj7JFFA9PV/w7yZ1Ot/yfUAVyqLBCi5qTep+Zo+59lvwaFIdUv88B+jartYpoT0k gmQnIIDDEwQAShu9CJfzbxO81IKG0UaUJJ1qMLtj3x2EdjGCaj4nUNsvpaEWR6UGhYyg XlCw== 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=zYQmMMgrkdgkT6WPBXbTityeLM7/e5dUY5PIiOK3HVs=; fh=lbcQL7oIYf/a0JavtqwyVBzHnxY9BvZg7G8H0sf1jLw=; b=wm58csVqKW8hQTRc0YcLwuAmmvZ53wQOoDmYGPBfUe+JPune7lcnCHTQ6tZ4A7uVDW hSx/HXvg6nrG5hSyTUw1pAVl8r+ViFaIUfNntXOAXaMLvLzrPh3Xf6nnfgIO4xff0KRu Nb8/C3IL23X2Z2tUutwIIioi54dSlEMK4nB2oniwMhJOziz9M2bLCOztU6cvcWLxjG8n KrV7sTFzx26A1NuMTbCu9UL2L5HBLcQ1CyXl235jH28saYMEuaH7StnH+GBgGuuOAIVo aqZwkDChai8LqkrWX1U3bYzxlQYFTxu6Wd4b1dZP3rBdkcIAthsxO7QSLSFXPZX3n3Cx 0B9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lahtm9Oe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x63-20020a636342000000b005b9483bf765si12452468pgb.25.2023.11.22.07.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 07:34:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lahtm9Oe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 26F198212AA1; Wed, 22 Nov 2023 07:34:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235267AbjKVPeE (ORCPT + 99 others); Wed, 22 Nov 2023 10:34:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235201AbjKVPdn (ORCPT ); Wed, 22 Nov 2023 10:33:43 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D5181BC9; Wed, 22 Nov 2023 07:33:16 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56A62C433CB; Wed, 22 Nov 2023 15:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700667195; bh=DBJcN5FTG05qwhWIh0MyzB/8LycVdIjfM46WyfaKjzU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lahtm9OeyXh+DnN6RG3klRBoI41SJnujm7SsriBS/yVSGWud9ukhj5uPzpvNSjojq Fim8i8SQthZqvUL5ll6zpndHTWYjjkD4x8zmJ5CTh9i3k1vfKT5ShcMfUmyewoPEsJ y9G6Ao1qUSvQmbqXobLmxw1/+bH7Ie+R6Vuopk5sXKU0oGRQ7zGn3V4LB6/5FWiu2q 30DeJMRSOxDDu45dtj81WGp3l2G06cztfara+n1d5p55AiY1kUmgS2BuYYCpXEUQbq S0XfG1C1YYq47R+VI12+1TR2OkRLK3WR5mZIVRK8xWyHIlxyZZB+bwYpSU/VNnSOxd XEhK3Dlijnveg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mikulas Patocka , Mike Snitzer , Sasha Levin , agk@redhat.com, dm-devel@lists.linux.dev Subject: [PATCH AUTOSEL 6.6 17/17] dm-crypt: start allocating with MAX_ORDER Date: Wed, 22 Nov 2023 10:31:46 -0500 Message-ID: <20231122153212.852040-17-sashal@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231122153212.852040-1-sashal@kernel.org> References: <20231122153212.852040-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.2 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 07:34:07 -0800 (PST) From: Mikulas Patocka [ Upstream commit 13648e04a9b831b3dfa5cf3887dfa6cf8fe5fe69 ] Commit 23baf831a32c ("mm, treewide: redefine MAX_ORDER sanely") changed the meaning of MAX_ORDER from exclusive to inclusive. So, we can allocate compound pages with up to 1 << MAX_ORDER pages. Reflect this change in dm-crypt and start trying to allocate compound pages with MAX_ORDER. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Signed-off-by: Sasha Levin --- drivers/md/dm-crypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 5315fd261c23b..9a4b4932438f3 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1679,7 +1679,7 @@ static struct bio *crypt_alloc_buffer(struct dm_crypt_io *io, unsigned int size) unsigned int nr_iovecs = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; gfp_t gfp_mask = GFP_NOWAIT | __GFP_HIGHMEM; unsigned int remaining_size; - unsigned int order = MAX_ORDER - 1; + unsigned int order = MAX_ORDER; retry: if (unlikely(gfp_mask & __GFP_DIRECT_RECLAIM)) -- 2.42.0