linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Eric DeVolder <eric.devolder@oracle.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	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
Subject: Re: [PATCH v25 06/10] crash: memory and CPU hotplug sysfs attributes
Date: Thu, 29 Jun 2023 17:31:33 -0500	[thread overview]
Message-ID: <e0f5adf6-4f47-75c7-5697-5e928bee14b7@oracle.com> (raw)
In-Reply-To: <c9d4e623-5c8c-885f-4343-980798647a0a@infradead.org>

Randy,
Thanks for looking at this! Inline comments below.
eric

On 6/29/23 15:59, Randy Dunlap wrote:
> Hi--
> 
> On 6/29/23 12:21, Eric DeVolder wrote:
>>
>> Signed-off-by: Eric DeVolder <eric.devolder@oracle.com>
>> Reviewed-by: Sourabh Jain <sourabhjain@linux.ibm.com>
>> Acked-by: Hari Bathini <hbathini@linux.ibm.com>
>> Acked-by: Baoquan He <bhe@redhat.com>
>> ---
>>   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.

Hmm, the 'make htmldocs' renders and views ok. Is there perhaps another method I should use?

> 
>>   
>>   .. 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.
> 
got it, thanks.

>> +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
> 
got it, thanks.

>> +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.


  reply	other threads:[~2023-06-29 22:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-29 19:21 [PATCH v25 00/10] crash: Kernel handling of CPU and memory hot un/plug Eric DeVolder
2023-06-29 19:21 ` [PATCH v25 01/10] drivers/base: refactor cpu.c to use .is_visible() Eric DeVolder
2023-07-03 13:05   ` Greg KH
2023-07-03 16:53     ` Eric DeVolder
2023-07-21 16:32       ` Eric DeVolder
2023-08-03 18:20         ` Eric DeVolder
2023-08-03 18:36           ` Greg KH
2023-06-29 19:21 ` [PATCH v25 02/10] drivers/base: refactor memory.c " Eric DeVolder
2023-06-29 19:21 ` [PATCH v25 03/10] crash: move a few code bits to setup support of crash hotplug Eric DeVolder
2023-06-29 19:21 ` [PATCH v25 04/10] crash: add generic infrastructure for crash hotplug support Eric DeVolder
2023-06-29 19:21 ` [PATCH v25 05/10] kexec: exclude elfcorehdr from the segment digest Eric DeVolder
2023-06-29 19:21 ` [PATCH v25 06/10] crash: memory and CPU hotplug sysfs attributes Eric DeVolder
2023-06-29 20:59   ` Randy Dunlap
2023-06-29 22:31     ` Eric DeVolder [this message]
2023-06-29 23:20       ` Randy Dunlap
2023-07-03 13:07   ` Greg KH
2023-07-03 16:57     ` Eric DeVolder
2023-06-29 19:21 ` [PATCH v25 07/10] x86/crash: add x86 crash hotplug support Eric DeVolder
2023-06-29 19:21 ` [PATCH v25 08/10] crash: hotplug support for kexec_load() Eric DeVolder
2023-06-29 19:21 ` [PATCH v25 09/10] crash: change crash_prepare_elf64_headers() to for_each_possible_cpu() Eric DeVolder
2023-06-29 19:21 ` [PATCH v25 10/10] x86/crash: optimize CPU changes Eric DeVolder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e0f5adf6-4f47-75c7-5697-5e928bee14b7@oracle.com \
    --to=eric.devolder@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=david@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=kexec@lists.infradead.org \
    --cc=konrad.wilk@oracle.com \
    --cc=lf32.dev@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@weissschuh.net \
    --cc=mingo@redhat.com \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=osalvador@suse.de \
    --cc=rafael@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=seanjc@google.com \
    --cc=sourabhjain@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.de \
    --cc=vbabka@suse.cz \
    --cc=vgoyal@redhat.com \
    --cc=vschneid@redhat.com \
    --cc=x86@kernel.org \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox