Message ID | 20240306102846.1020868-8-lizhijian@fujitsu.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 00F72C5475B for <linux-mm@archiver.kernel.org>; Wed, 6 Mar 2024 10:29:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8FDEE6B0092; Wed, 6 Mar 2024 05:29:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 835EB6B0095; Wed, 6 Mar 2024 05:29:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 612336B0096; Wed, 6 Mar 2024 05:29:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 488466B0092 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 05:29:22 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2648B160BB6 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 10:29:22 +0000 (UTC) X-FDA: 81866242164.08.1B44877 Received: from esa1.hc1455-7.c3s2.iphmx.com (esa1.hc1455-7.c3s2.iphmx.com [207.54.90.47]) by imf24.hostedemail.com (Postfix) with ESMTP id B6AE4180004 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 10:29:19 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=fujitsu.com header.s=fj2 header.b=SDZkQN7J; dmarc=pass (policy=quarantine) header.from=fujitsu.com; spf=pass (imf24.hostedemail.com: domain of lizhijian@fujitsu.com designates 207.54.90.47 as permitted sender) smtp.mailfrom=lizhijian@fujitsu.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709720960; a=rsa-sha256; cv=none; b=OgvxJeMPm/R6aZ0GBHw3sEURjdTK8SRoo8JN3G8uVeeJWKo0qn/CvJaIeuPK7Uiv5Td2OK VOxGSe9DRJlIyuBnahnpHaISQib/ml1Ab/MuEyYTHRjKCnvm5UXQSj8iR4FaefJw5wcIHs b987zrN/xcyEdR+Hu9hPvuVFCwyqhJw= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=fujitsu.com header.s=fj2 header.b=SDZkQN7J; dmarc=pass (policy=quarantine) header.from=fujitsu.com; spf=pass (imf24.hostedemail.com: domain of lizhijian@fujitsu.com designates 207.54.90.47 as permitted sender) smtp.mailfrom=lizhijian@fujitsu.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709720960; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2PX/7oEshLYBEnPu1DpfJYRcBCZOOjFvxfe1NNP9G6w=; b=aNIJYfQvtyb+JjNnGajzNiIcq2Ie7pjeAIdeqdZ14Kj+yN/jQc6cEiKwe5kgz5gNLNddc/ w7T6pEfNE1q0mSQi8a73UKHbiqqPpdDuNMdDK7Ec0Fkvtyx/zX8LvVAk2a96rIgzmwamwW BLuzkg/j2oQL19Jm55YncJ0Rd3ug3IM= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj2; t=1709720960; x=1741256960; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cfFr9yDzIDYGuhO0ed+4EUdT/tYXSwMTNGM6ftOGOr0=; b=SDZkQN7JlwIl7HCyzxxUYCgto0LlRQDOGXHqgsYFhQdZ7ZnhSt/bhnpL bmd1b3HesMav69VQWxSacovGLN7X8NRejNgjciFffAh1GDWjwq8QlRu0U qDyWsozf3qnT4N63iM2Vk6OWPsyxcpY6xLo9H3PIYkfZ2+Iz9iODHEcfN dpfPJwpM47MirKwCS8Ya+Dpf4XIf5O/FVpZeU4NMWeilNbuWdzaFIxOcN 7zOBeHVBr/ttN4kF9j3TAhhTotpjzAl4tFlE9cvSsqMXIAC9y4JIczJdW WGH0EJgDrqmdSSCRug+a6yQl89fLlE0T+b5pQHsGK8uB8espNLdTG1Zl+ w==; X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="151260041" X-IronPort-AV: E=Sophos;i="6.06,208,1705330800"; d="scan'208";a="151260041" Received: from unknown (HELO oym-r3.gw.nic.fujitsu.com) ([210.162.30.91]) by esa1.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2024 19:29:17 +0900 Received: from oym-m3.gw.nic.fujitsu.com (oym-nat-oym-m3.gw.nic.fujitsu.com [192.168.87.60]) by oym-r3.gw.nic.fujitsu.com (Postfix) with ESMTP id 4294D12E239 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 19:29:13 +0900 (JST) Received: from kws-ab3.gw.nic.fujitsu.com (kws-ab3.gw.nic.fujitsu.com [192.51.206.21]) by oym-m3.gw.nic.fujitsu.com (Postfix) with ESMTP id 794A6D5628 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 19:29:12 +0900 (JST) Received: from edo.cn.fujitsu.com (edo.cn.fujitsu.com [10.167.33.5]) by kws-ab3.gw.nic.fujitsu.com (Postfix) with ESMTP id 1543D2030C7E0 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 19:29:12 +0900 (JST) Received: from localhost.localdomain (unknown [10.167.226.45]) by edo.cn.fujitsu.com (Postfix) with ESMTP id 1E80D1A006D; Wed, 6 Mar 2024 18:29:11 +0800 (CST) From: Li Zhijian <lizhijian@fujitsu.com> To: linux-kernel@vger.kernel.org Cc: y-goto@fujitsu.com, Alison Schofield <alison.schofield@intel.com>, Andrew Morton <akpm@linux-foundation.org>, Baoquan He <bhe@redhat.com>, Borislav Petkov <bp@alien8.de>, Dan Williams <dan.j.williams@intel.com>, Dave Hansen <dave.hansen@linux.intel.com>, Dave Jiang <dave.jiang@intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, hpa@zytor.com, Ingo Molnar <mingo@redhat.com>, Ira Weiny <ira.weiny@intel.com>, Thomas Gleixner <tglx@linutronix.de>, Vishal Verma <vishal.l.verma@intel.com>, linux-cxl@vger.kernel.org, linux-mm@kvack.org, nvdimm@lists.linux.dev, x86@kernel.org, kexec@lists.infradead.org, Li Zhijian <lizhijian@fujitsu.com> Subject: [PATCH v3 7/7] nvdimm: set force_raw=1 in kdump kernel Date: Wed, 6 Mar 2024 18:28:46 +0800 Message-Id: <20240306102846.1020868-8-lizhijian@fujitsu.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240306102846.1020868-1-lizhijian@fujitsu.com> References: <20240306102846.1020868-1-lizhijian@fujitsu.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSS-9.1.0.1417-9.0.0.1002-28234.006 X-TM-AS-User-Approved-Sender: Yes X-TMASE-Version: IMSS-9.1.0.1417-9.0.1002-28234.006 X-TMASE-Result: 10-2.938000-10.000000 X-TMASE-MatchedRID: MGSvkkc+rOj7w6uw5pqYnoOlbll4OMtk9LMB0hXFSeg6Zx3YUNQTG+Wh NKYuM7eN4QRvjxz49tHS7j6TEIEt1D3TQfUpAv1sPkILbTHNp5vYUDvAr2Y/17fYIuZsOQ0sOXB 2cqV0mCIre4xpX839SBGJgBWjZYF4x7Pq8adLcfrum6Nvy6t3NlK6+0HOVoSowLkNMQzGl5B+Kr WCPbERP80Age9hS2jaRMoI0qlZNIJF28kU6TjvF869emDs42ddfS0Ip2eEHnz3IzXlXlpamPoLR 4+zsDTtqrM46JQnL8hECPUxiiiZOrOyZvt4D+xsOs3xt1PQttJyHuAILm2j36P9W6TbIoRbP/Sq eQCjGYXssHsZ3G5ixlOiTS2pFc4fpGuqGtYITgaGk+xUaqdMDwHEKwHwYevbwUSxXh+jiUgkww/ gwY7hMA== X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: B6AE4180004 X-Stat-Signature: a8dubg4ismob87trwf3op3cmhcnb8or6 X-HE-Tag: 1709720959-896476 X-HE-Meta: U2FsdGVkX1/3+l0qL/s5qHNSAGqwmUV8q/vr0TK7Pty0UNYYtuuRecvVwHpAIa4cSmZwthDo4te+drtCdqXjiSoPX0JyIAbIZ5jD4e3gU7x5UnkJ84kXiY/rl5oTnAMDADy5OKgy8uSKoONaMSBSj/z6cWA4zuqHbe5CWHgesxmD1r/WPzbFoVnUY7FuZYpiuuxLa7MZlu2GuM05D+5nCK2wBaNvLzQA2pNrzkYwi+QrYbmhXjDSC4EElkWla0AMW7PwvC7UFVFeY67qnYCvuyr1Pbcn6MJs5xy865B1F0DLEhbzxHPtBWSE5jprqC6+6UJALJyrTQE+LUgTJHMSN6aAuXe60g9Y5IX0uaWp4OS+aTv469xuozEupDk6TJ1yzCI3yV6pE2YhB9/DIOWA8Ga1l8HzEtix1gAGbh695SuaWYR9sC+iK8YrtUXr1aJcq0pVaUHOFbgeWTfot9Xr3C6kNvQkR5/GLbzRKz+9Cv2E5jPl8sQqH2O3op4COyuQKECsIOE1gw38KxnT3E0llA7eefSgjjR5ucthni/5W0YbWgEKZhHt397mlpKtXuJwWOjv9ng3UFIWoJqJ1dyE7VIBNPukt88Jp+D5osNzj2OpMKzkm0XZpRS5MPps+dLoaiO4NvkFixc/SmN3jLQEYmOlIhnUlxghOhGZDc4iWMYzAOsrgqBzbF4hpqoU6CJgWwVrxMotiCqaCbvWOrkMVcZ8II92V5fweZAlSW7keyVPBHKJ39zjj/AoUjbsN9i0VPgXIwsV61Efv7b/j4PTXoyB3VrELrVHkwMfJIdPQnXyc/1HpgU3Uukf3UxDRisVzItKW2Yo2boPPHh3REotzvmg/fNATOstCRkgTFJNZ6gzU2TQ138yADkEOdgCBD+1p/vnxdq3z87h/WEJRJ2Oh01RKwSg1tlSxiRQCPy/VmStgSZUIGU6bFWwRW3Sx17sdNggeYQh0McJ8mRRL8Y 9hXr7UtE h58Il/K1w3wkJkWxt8TNpdR0pMb8N6Dx2+eyAR/SSst0ibYbtWYabGx0AHmQPCi0aX5Wym6haEvwsyYmpX3j2y4U6jH9y3FdVOiSxi9zfR6OI7QEyjTcwS7uy4SeljGCloWgnIVNSlxehp1DwP8liy1TW0JNQW1LJ/1gKXqAts+JhpaFQ1EY04gm2WO3vDQX/7juAim/0zJ92Y9fGRgxPmK/fxAHsmQeRVWb6iJOP4VaalPwGOikQUDDqIQ84d8ENBvF1PrxRn3F5kL+WUhrF1e3+iye3OfVqvIwnlCV1/u1PowdgQZYCT9FKLA== 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
device backed vmemmap crash dump support
|
expand
|
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index d6d558f94d6b..04f855c7f0b1 100644 --- a/drivers/nvdimm/namespace_devs.c +++ b/drivers/nvdimm/namespace_devs.c @@ -9,6 +9,7 @@ #include <linux/slab.h> #include <linux/list.h> #include <linux/nd.h> +#include <linux/crash_dump.h> #include "nd-core.h" #include "pmem.h" #include "pfn.h" @@ -1513,6 +1514,8 @@ struct nd_namespace_common *nvdimm_namespace_common_probe(struct device *dev) return ERR_PTR(-ENODEV); } + if (is_kdump_kernel()) + ndns->force_raw = true; return ndns; } EXPORT_SYMBOL(nvdimm_namespace_common_probe);
The virtually mapped memory map allows storing struct page objects for persistent memory devices in pre-allocated storage on those devices. These 'struct page objects' on devices are also known as metadata. During libnvdimm/nd_pmem are loading, the previous metadata will be re-constructed to fit the current running kernel. For kdump purpose, these metadata should not be touched until the dumping is done so that the metadata is identical. To achieve this, we have some options 1. Don't provide libnvdimm driver in kdump kernel rootfs/initramfs 2. Disable libnvdimm driver by specific comline parameters: (initcall_blacklist=libnvdimm_init libnvdimm.blacklist=1 rd.driver.blacklist=libnvdimm) 3. Enforce force_raw=1 for nvdimm namespace, because when force_raw=1, metadata will not be re-constructed again. This may also result in the pmem doesn't work before a few extra configurations. Here apply the 3rd option. CC: Dan Williams <dan.j.williams@intel.com> CC: Vishal Verma <vishal.l.verma@intel.com> CC: Dave Jiang <dave.jiang@intel.com> CC: Ira Weiny <ira.weiny@intel.com> CC: nvdimm@lists.linux.dev Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> --- drivers/nvdimm/namespace_devs.c | 3 +++ 1 file changed, 3 insertions(+)