From nobody Tue Apr 7 16:28:40 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F387ECAAD6 for ; Fri, 26 Aug 2022 15:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244359AbiHZPK3 (ORCPT ); Fri, 26 Aug 2022 11:10:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244667AbiHZPJW (ORCPT ); Fri, 26 Aug 2022 11:09:22 -0400 Received: from mail-ej1-x64a.google.com (mail-ej1-x64a.google.com [IPv6:2a00:1450:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3FBADD746 for ; Fri, 26 Aug 2022 08:08:42 -0700 (PDT) Received: by mail-ej1-x64a.google.com with SMTP id ho13-20020a1709070e8d00b00730a655e173so720929ejc.8 for ; Fri, 26 Aug 2022 08:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc; bh=KyITLg/74GrhViHFJeQt7QU8AnVbkb7jycJ7NufNBUo=; b=JGLI1XVMHG2i60SDAlQT0tbexjKijbMvRCyJBm7rqKpNb8F4aYTTCeDzdw3DZRTTY9 9aBJI5GzvyT5OHahe6P/FLulT47ZG48jaSm51uWVpeEM2anno2pVkr/HWnEaP4dzX2sF twstPsWzst1+5uhmUIC538U8YzMDGMv8YPX1agG8mT4BMvYcmTbtHBdrbhp45twT7nWE nz3m1f2/FPyxoUBD0WCWPwU+2VcI0cRXIUlw4UKcnV2+HEz4YBqOj5X/pB0YMkzOfjBA Gfm4kLyCfYg0BuipDD2uTTZ9O06RAPnTfMpt3Cr9PpAqZlkS4Eal6zCfjZiQC/y2Ypav PWuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc; bh=KyITLg/74GrhViHFJeQt7QU8AnVbkb7jycJ7NufNBUo=; b=FQ7oN2ySSbGyejGHgvbpaa3hKB5iM7fZG86n6+ehpAdhYSWDFIUv1A7joRYiwQglhD O2iU1bZbrnP8m4Esr6RQtw0P9Pnhfpo8UdjZwUwo1aPoqNaW3qlm8vc2jnj/oMMkVhNN TEn1FooNNsaDzaBIz3QtWxY01yHts9yEk7D9kOp1l6yFY+NrjAjJnfP/asyWZMBVaDcc yq9BC71JQyfLnT1xkt3c3elN0rGOnRjZba7P39j9NEXzdtA9fSbXNK+s3eZXkXcQcQ+J 9mfTwrZww40+01k3nGIWd4Cz4jkbVkUoUD15/+bycGt/IugXs6tMp6S35SPSEbS9CDtj zzXQ== X-Gm-Message-State: ACgBeo0ZlDmff0MVuqjrug9TcowdwZKdjPQuzK3bAeiwZNrvB77yVAGN g0D4NOVGLaErjG1dDzPUaAqpTZeqc6o= X-Google-Smtp-Source: AA6agR4pAyh98UW17iINAKOiWgkXvBjhtWUMPuOGGFy1IcJGaEVoMCTj1DvlVljTnjKpWwFAIOs4GvCri44= X-Received: from glider.muc.corp.google.com ([2a00:79e0:9c:201:5207:ac36:fdd3:502d]) (user=glider job=sendgmr) by 2002:a17:907:a04e:b0:73d:8419:3d88 with SMTP id gz14-20020a170907a04e00b0073d84193d88mr5498703ejc.616.1661526521065; Fri, 26 Aug 2022 08:08:41 -0700 (PDT) Date: Fri, 26 Aug 2022 17:07:33 +0200 In-Reply-To: <20220826150807.723137-1-glider@google.com> Mime-Version: 1.0 References: <20220826150807.723137-1-glider@google.com> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog Message-ID: <20220826150807.723137-11-glider@google.com> Subject: [PATCH v5 10/44] libnvdimm/pfn_dev: increase MAX_STRUCT_PAGE_SIZE From: Alexander Potapenko To: glider@google.com Cc: Alexander Viro , Alexei Starovoitov , Andrew Morton , Andrey Konovalov , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Christoph Hellwig , Christoph Lameter , David Rientjes , Dmitry Vyukov , Eric Dumazet , Greg Kroah-Hartman , Herbert Xu , Ilya Leoshkevich , Ingo Molnar , Jens Axboe , Joonsoo Kim , Kees Cook , Marco Elver , Mark Rutland , Matthew Wilcox , "Michael S. Tsirkin" , Pekka Enberg , Peter Zijlstra , Petr Mladek , Steven Rostedt , Thomas Gleixner , Vasily Gorbik , Vegard Nossum , Vlastimil Babka , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" KMSAN adds extra metadata fields to struct page, so it does not fit into 64 bytes anymore. This change leads to increased memory consumption of the nvdimm driver, regardless of whether the kernel is built with KMSAN or not. Signed-off-by: Alexander Potapenko Reviewed-by: Marco Elver --- Link: https://linux-review.googlesource.com/id/I353796acc6a850bfd7bb342aa1b= 63e616fc614f1 --- drivers/nvdimm/nd.h | 2 +- drivers/nvdimm/pfn_devs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h index ec5219680092d..85ca5b4da3cf3 100644 --- a/drivers/nvdimm/nd.h +++ b/drivers/nvdimm/nd.h @@ -652,7 +652,7 @@ void devm_namespace_disable(struct device *dev, struct nd_namespace_common *ndns); #if IS_ENABLED(CONFIG_ND_CLAIM) /* max struct page size independent of kernel config */ -#define MAX_STRUCT_PAGE_SIZE 64 +#define MAX_STRUCT_PAGE_SIZE 128 int nvdimm_setup_pfn(struct nd_pfn *nd_pfn, struct dev_pagemap *pgmap); #else static inline int nvdimm_setup_pfn(struct nd_pfn *nd_pfn, diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c index 0e92ab4b32833..61af072ac98f9 100644 --- a/drivers/nvdimm/pfn_devs.c +++ b/drivers/nvdimm/pfn_devs.c @@ -787,7 +787,7 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn) * when populating the vmemmap. This *should* be equal to * PMD_SIZE for most architectures. * - * Also make sure size of struct page is less than 64. We + * Also make sure size of struct page is less than 128. We * want to make sure we use large enough size here so that * we don't have a dynamic reserve space depending on * struct page size. But we also want to make sure we notice --=20 2.37.2.672.g94769d06f0-goog