From mboxrd@z Thu Jan 1 00:00:00 1970 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 A839FEB64D9 for ; Thu, 29 Jun 2023 20:59:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 298158D0002; Thu, 29 Jun 2023 16:59:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 220DE8D0001; Thu, 29 Jun 2023 16:59:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 09B348D0002; Thu, 29 Jun 2023 16:59:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id EABB88D0001 for ; Thu, 29 Jun 2023 16:59:44 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id BAA8E1204AD for ; Thu, 29 Jun 2023 20:59:44 +0000 (UTC) X-FDA: 80957001888.04.6AAA222 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf05.hostedemail.com (Postfix) with ESMTP id 6D802100019 for ; Thu, 29 Jun 2023 20:59:41 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=Jy12NeGE; spf=none (imf05.hostedemail.com: domain of rdunlap@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=rdunlap@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688072382; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=71PV5aDwVtaV5fStzwHqmQJIJQPeReGlo36D/hVKmtE=; b=doM6oWJX0Faq/epOJLz//cOQ/Lol9AGmLejIMTXCJVdJg0pOo12IiJ47BaCjxWN3CgVSoh g/3Tj6rAROB/F1sv1UCBoj51tKw2ybiLbMx5GyvHMWyGHNbUB2TQeNQcmn/R0J/UZrIaLk N363DZemC6oC3FWKK/GS0Q7P4sFBHPs= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=Jy12NeGE; spf=none (imf05.hostedemail.com: domain of rdunlap@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=rdunlap@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688072382; a=rsa-sha256; cv=none; b=aTKfh8DvfizZM5SUJasG09ryI78pcfgj8Y6s+xcB81Yd/7JwHM8Zlr3RqKRHNqAQRh7OSd 48/AxJBHIuuZz9jXTRjbh2a0FH+BgPVzHUGIfEzdtwAN38Dog1a4NholeO2jLVMyhDsEm6 eHuX9M4fOBUJ+PNCDzY1TFgpPFH/qVk= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=71PV5aDwVtaV5fStzwHqmQJIJQPeReGlo36D/hVKmtE=; b=Jy12NeGE/o5x85OdUwJQdskavi wtIjLdGJ2u5VC7DaMEQycOW7YpZpqLGbeX4R2MbVAWilTyTj8TOBn0Zkg+cnfFDTmLeyxbiEcwgKO kNAwO/9cI0b/BJBg6V7coiRB7uPie/Pmp7/C+AeQ1quBuE3BAmQvmqj63mffkFK7qcejMasYkEyLu xjEsRTQYdw+zJOgV6gKwwkHdtJpoRjAI1cVASrkRxevC7mbpGmCsN5TnmNRgV9yN4jvcUHTi3FTDC joZPT9V9RRJex3ow7X2g8DKMCwb6LCX/XOnnwVyhvWQEnr+GA1qRSdWY3t6nw7EyGPaViHRKZ/Awx mkdWekWA==; Received: from [2601:1c2:980:9ec0::2764] by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qEyjL-002AFE-2A; Thu, 29 Jun 2023 20:59:07 +0000 Message-ID: Date: Thu, 29 Jun 2023 13:59:05 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v25 06/10] crash: memory and CPU hotplug sysfs attributes Content-Language: en-US To: Eric DeVolder , linux-kernel@vger.kernel.org, david@redhat.com, osalvador@suse.de, corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, bhe@redhat.com, ebiederm@xmission.com, kexec@lists.infradead.org Cc: hpa@zytor.com, gregkh@linuxfoundation.org, rafael@kernel.org, vgoyal@redhat.com, dyoung@redhat.com, lf32.dev@gmail.com, akpm@linux-foundation.org, naveen.n.rao@linux.vnet.ibm.com, zohar@linux.ibm.com, bhelgaas@google.com, vbabka@suse.cz, tiwai@suse.de, seanjc@google.com, linux@weissschuh.net, vschneid@redhat.com, linux-mm@kvack.org, linux-doc@vger.kernel.org, sourabhjain@linux.ibm.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com References: <20230629192119.6613-1-eric.devolder@oracle.com> <20230629192119.6613-7-eric.devolder@oracle.com> From: Randy Dunlap In-Reply-To: <20230629192119.6613-7-eric.devolder@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 6D802100019 X-Rspam-User: X-Stat-Signature: p6isnz4fs43t3rfbo6gijs1na989jx9x X-Rspamd-Server: rspam01 X-HE-Tag: 1688072381-375211 X-HE-Meta: U2FsdGVkX1+52G9Em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fFwnQHiiEf6jlta/mZX8Pw80h+ulWSuWljh1LKt/za4rRE/4WBx0DAfes1xerE3ZTTyXXEq3wEPpwg69Tps6D/TcF3fy8hfuKh4yXNHsmGo3xZso7FLpFe6toZvvuZciVSKuwVWQ8rzCMB8jQ9eb2tgXGEp+UXziKnnVat5tZFqhketiZTTNnZtBGaOXzKy+N7sDh9PmDCBbqNwTPRwV81KvsmuK6TRZIKNMphy8FDmVYNqy3i/ZGxvgNwV6lrjsQ2 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: Hi-- On 6/29/23 12:21, Eric DeVolder wrote: > > Signed-off-by: Eric DeVolder > Reviewed-by: Sourabh Jain > Acked-by: Hari Bathini > Acked-by: Baoquan He > --- > Documentation/ABI/testing/sysfs-devices-memory | 8 ++++++++ > .../ABI/testing/sysfs-devices-system-cpu | 8 ++++++++ > .../admin-guide/mm/memory-hotplug.rst | 8 ++++++++ > Documentation/core-api/cpu_hotplug.rst | 18 ++++++++++++++++++ > drivers/base/cpu.c | 16 ++++++++++++++-- > drivers/base/memory.c | 13 +++++++++++++ > include/linux/kexec.h | 8 ++++++++ > 7 files changed, 77 insertions(+), 2 deletions(-) > > diff --git a/Documentation/admin-guide/mm/memory-hotplug.rst b/Documentation/admin-guide/mm/memory-hotplug.rst > index 1b02fe5807cc..eb99d79223a3 100644 > --- a/Documentation/admin-guide/mm/memory-hotplug.rst > +++ b/Documentation/admin-guide/mm/memory-hotplug.rst > @@ -291,6 +291,14 @@ The following files are currently defined: > Availability depends on the CONFIG_ARCH_MEMORY_PROBE > kernel configuration option. > ``uevent`` read-write: generic udev file for device subsystems. > +``crash_hotplug`` read-only: when changes to the system memory map > + occur due to hot un/plug of memory, this file contains > + '1' if the kernel updates the kdump capture kernel memory > + map itself (via elfcorehdr), or '0' if userspace must update > + the kdump capture kernel memory map. > + > + Availability depends on the CONFIG_MEMORY_HOTPLUG kernel > + configuration option. > ====================== ========================================================= Did you test build the documentation? It looks to me like the end-of-table '=' signs line needs 3 more === to be long enough for the text above it. > > .. note:: > diff --git a/Documentation/core-api/cpu_hotplug.rst b/Documentation/core-api/cpu_hotplug.rst > index e6f5bc39cf5c..54581c501562 100644 > --- a/Documentation/core-api/cpu_hotplug.rst > +++ b/Documentation/core-api/cpu_hotplug.rst > @@ -741,6 +741,24 @@ will receive all events. A script like:: > > can process the event further. > > +When changes to the CPUs in the system occur, the sysfs file > +/sys/devices/system/cpu/crash_hotplug contains '1' if the kernel > +updates the kdump capture kernel list of CPUs itself (via elfcorehdr), > +or '0' if userspace must update the kdump capture kernel list of CPUs. > + > +The availability depends on the CONFIG_HOTPLUG_CPU kernel configuration > +option. > + > +To skip userspace processing of CPU hot un/plug events for kdump > +(ie the unload-then-reload to obtain a current list of CPUs), this sysfs i.e. > +file can be used in a udev rule as follows: > + > + SUBSYSTEM=="cpu", ATTRS{crash_hotplug}=="1", GOTO="kdump_reload_end" > + > +For a cpu hot un/plug event, if the architecture supports kernel updates CPU for consistency > +of the elfcorehdr (which contains the list of CPUs), then the rule skips > +the unload-then-reload of the kdump capture kernel. > + > Kernel Inline Documentations Reference > ====================================== > Thanks. -- ~Randy