From patchwork Fri Jul 1 14:22:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Potapenko X-Patchwork-Id: 12903367 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A54DC43334 for ; Fri, 1 Jul 2022 14:23:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9A2EB6B0081; Fri, 1 Jul 2022 10:23:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 92D396B0082; Fri, 1 Jul 2022 10:23:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7A6486B0083; Fri, 1 Jul 2022 10:23:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 6A97B6B0081 for ; Fri, 1 Jul 2022 10:23:45 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 47AF2EC7 for ; Fri, 1 Jul 2022 14:23:45 +0000 (UTC) X-FDA: 79638749610.14.3989A61 Received: from mail-ej1-f74.google.com (mail-ej1-f74.google.com [209.85.218.74]) by imf04.hostedemail.com (Postfix) with ESMTP id CB0B440045 for ; Fri, 1 Jul 2022 14:23:44 +0000 (UTC) Received: by mail-ej1-f74.google.com with SMTP id k7-20020a1709062a4700b006fe92440164so844990eje.23 for ; Fri, 01 Jul 2022 07:23:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=AkHvx6ZxtZ0IjsJvZfH9AmZNAyLy9uG4lwf6iPpek9Y=; b=rHudIZCMEvVcL0J/tpORMCU1TSzScrZ6kJnwi8au7+a6JF30h8PGv5ybkos7NSpKVF l8ItJ4ldc7rg9EUkrGxk8hBljzCbzYjQgUwA1nGDUYpjSYBpSv1cZheZLHTOEc3UGcpz GN3MhPn5PyMEGYWYnmCKoNlKEkO4c/obwSOro9mv0hP92gHSxiMzcqtoWoMzuEAzed2q wII50gyDZqPcOzaGsoh2O4Imju9tw8/pg9ZgJAzo8hKdBhlLYoNWrG5KLaa/L/jFhzEF QS0SOmwTV1hAlRt1ITxae7Jk30DIUPW7GuCpXSA6Yvjsk9qUvcwrEZ8Tfb30DarFex/+ W40w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=AkHvx6ZxtZ0IjsJvZfH9AmZNAyLy9uG4lwf6iPpek9Y=; b=K+4T91QNlSeFSbdJubvW3gdapSt4/Gy5G4/nlvKN3kOgRh5iOhxF8FuaNJrQqui2xI WbEdlOYBMMXgu+246FFLN164TPKzKgUKJUdYxrtu3sNWRWBxg1Df1CmowiD/oGpFRAtF GAMK3Aw64k9wn/KJTf3jO8babHu+N4YTtpCl2fU894c74ALo7ceNVaHXPQ2IVzoOx6Cf sjoguus8XtXvmmBObd/O+qoWZgvQn3CKtsnuYy97IAdJF94wIXZsoDVQkF0p4+ulwdPw +wI/SC85LMvyuz9oZb++mQGqajnm3qVA/LpiNBF6j49Ufr8rLzQuPWr3LiRTaM9FIspI Ctdw== X-Gm-Message-State: AJIora/pHGsbJFGWZ9bQNQdoRvzkmWciXL4rXlN1fk5mjveQi2lyA0WR gSNVQ01hBcniUKz6fG60HHNCx3QLnag= X-Google-Smtp-Source: AGRyM1s+kuVh9fols3fC269jhlEDP/Rp/CRoJ+oGxYSY9r03d5HAcg3xOh5GvCrJCoCJuu3kbfRaEWJ10XY= X-Received: from glider.muc.corp.google.com ([2a00:79e0:9c:201:a6f5:f713:759c:abb6]) (user=glider job=sendgmr) by 2002:a50:fe83:0:b0:437:9c60:12f3 with SMTP id d3-20020a50fe83000000b004379c6012f3mr19071968edt.120.1656685423650; Fri, 01 Jul 2022 07:23:43 -0700 (PDT) Date: Fri, 1 Jul 2022 16:22:35 +0200 In-Reply-To: <20220701142310.2188015-1-glider@google.com> Message-Id: <20220701142310.2188015-11-glider@google.com> Mime-Version: 1.0 References: <20220701142310.2188015-1-glider@google.com> X-Mailer: git-send-email 2.37.0.rc0.161.g10f37bed90-goog Subject: [PATCH v4 10/45] 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 ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=rHudIZCM; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf04.hostedemail.com: domain of 3bwO_YgYKCI4y30vw9y66y3w.u64305CF-442Dsu2.69y@flex--glider.bounces.google.com designates 209.85.218.74 as permitted sender) smtp.mailfrom=3bwO_YgYKCI4y30vw9y66y3w.u64305CF-442Dsu2.69y@flex--glider.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656685424; a=rsa-sha256; cv=none; b=TzwRg1MoKqqzJ6Jtyx8Zi3y1LK2GEeOKz2wtF5vshkncRbNBlOKpRFZwlThY5/EnIVxBi0 E3t6Bl2TMsyCWIXBhMd7Mp30tyv3yENT+towwsrBO+L6gJIijDkKrT1c+JFtHhP/PaEug1 U18a71Yphky9Ug0060bZ56ejyzn/ywM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656685424; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=AkHvx6ZxtZ0IjsJvZfH9AmZNAyLy9uG4lwf6iPpek9Y=; b=Ik/gklbSUi9AgD2ERzrjUeWxRtHSogIDCqEUVtwdA8XSpcD4XuDExrDBeZWECNVTRayI+7 pN5Qr9ls469NXzWf6ZpoD/5CtqTyNhg55HMNJSztaqmdN+fWIvPScA250166I6XQrovcqU RRZS7KAyiL4JyyK11PTdHD6hpf/L01A= X-Stat-Signature: z8etfz3bg7thuiwy1c7iqr9ngttu9n49 X-Rspamd-Queue-Id: CB0B440045 Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=rHudIZCM; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf04.hostedemail.com: domain of 3bwO_YgYKCI4y30vw9y66y3w.u64305CF-442Dsu2.69y@flex--glider.bounces.google.com designates 209.85.218.74 as permitted sender) smtp.mailfrom=3bwO_YgYKCI4y30vw9y66y3w.u64305CF-442Dsu2.69y@flex--glider.bounces.google.com X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1656685424-283182 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: KMSAN adds extra metadata fields to struct page, so it does not fit into 64 bytes anymore. Signed-off-by: Alexander Potapenko Reviewed-by: Marco Elver Reported-by: Jeff Moyer --- Link: https://linux-review.googlesource.com/id/I353796acc6a850bfd7bb342aa1b63e616fc614f1 --- 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