linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sourabh Jain <sourabhjain@linux.ibm.com>
To: Eric DeVolder <eric.devolder@oracle.com>,
	linuxppc-dev@ozlabs.org, mpe@ellerman.id.au
Cc: mahesh@linux.vnet.ibm.com, ldufour@linux.ibm.com,
	kexec@lists.infradead.org, hbathini@linux.ibm.com,
	bhe@redhat.com
Subject: Re: [PATCH v10 0/5] PowerPC: In-kernel handling of CPU/Memory hotplug/online/offline events for kdump kernel
Date: Mon, 24 Apr 2023 20:43:19 +0530	[thread overview]
Message-ID: <dfee1e13-01cb-e2f3-61cb-9f9c51f2a875@linux.ibm.com> (raw)
In-Reply-To: <9713a2e4-ac13-425f-1954-fe16ff318916@oracle.com>


On 24/04/23 19:35, Eric DeVolder wrote:
>
>
> On 4/23/23 05:52, Sourabh Jain wrote:
>> The Problem:
>> ============
>> Post CPU/Memory hot plug/unplug and online/offline events the kernel
>> holds stale information about the system. Dump collection with stale
>> kdump kernel might end up in dump capture failure or an inaccurate dump
>> collection.
>>
>> Existing solution:
>> ==================
>> The existing solution to keep the kdump kernel up-to-date by monitoring
>> CPU/Memory hotplug/online/offline events via udev rule and trigger a 
>> full
>> kdump kernel reload for every hotplug event.
>>
>> Shortcomings:
>> ------------------------------------------------
>> - Leaves a window where kernel crash might not lead to a successful dump
>>    collection.
>> - Reloading all kexec components for each hotplug is inefficient.
>> - udev rules are prone to races if hotplug events are frequent.
>>
>> More about issues with an existing solution is posted here:
>>   - https://lkml.org/lkml/2020/12/14/532
>>   - 
>> https://lists.ozlabs.org/pipermail/linuxppc-dev/2022-February/240254.html
>>
>> Proposed Solution:
>> ==================
>> Instead of reloading all kexec segments on CPU/Memory 
>> hotplug/online/offline
>> event, this patch series focuses on updating only the relevant kexec 
>> segment.
>> Once the kexec segments are loaded in the kernel reserved area then an
>> arch-specific hotplug handler will update the relevant kexec segment 
>> based on
>> hotplug event type.
>>
>> Series Dependencies
>> ====================
>> This patch series implements the crash hotplug handler on PowerPC. 
>> The generic
>> crash hotplug handler is introduced by 
>> https://lkml.org/lkml/2023/4/4/1136 patch
>> series.
>>
>> Git tree for testing:
>> =====================
>> The below git tree has this patch series applied on top of dependent 
>> patch
>> series.
>> https://github.com/sourabhjains/linux/tree/e21-s10
>>
>> To realise the feature the kdump udev rule must updated to avoid
>> reloading of kdump reload on CPU/Memory hotplug/online/offline events.
>>
>>    RHEL: /usr/lib/udev/rules.d/98-kexec.rules
>>
>>     -SUBSYSTEM=="cpu", ACTION=="online", GOTO="kdump_reload_cpu"
>>     -SUBSYSTEM=="memory", ACTION=="online", GOTO="kdump_reload_mem"
>>     -SUBSYSTEM=="memory", ACTION=="offline", GOTO="kdump_reload_mem"
>>     +SUBSYSTEM=="cpu", ATTRS{crash_hotplug}=="1", 
>> GOTO="kdump_reload_end"
>>     +SUBSYSTEM=="memory", ATTRS{crash_hotplug}=="1", 
>> GOTO="kdump_reload_end"
>>
>
> I didn't see in the patch series where you would have the equivalent 
> to the following (needed for the sysfs crash_hotplug entries):
>
> #ifdef CONFIG_HOTPLUG_CPU
> static inline int crash_hotplug_cpu_support(void) { return 1; }
> #define crash_hotplug_cpu_support crash_hotplug_cpu_support
> #endif
>
> #ifdef CONFIG_MEMORY_HOTPLUG
> static inline int crash_hotplug_memory_support(void) { return 1; }
> #define crash_hotplug_memory_support crash_hotplug_memory_support
> #endif

I missed the above diff in my testing environment. Thanks you for 
bringing it
to my attention. I will fix this next version.

- Sourabh Jain

      reply	other threads:[~2023-04-24 15:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23 10:52 [PATCH v10 0/5] PowerPC: In-kernel handling of CPU/Memory hotplug/online/offline events for kdump kernel Sourabh Jain
2023-04-23 10:52 ` [PATCH v10 1/5] powerpc/kexec: turn some static helper functions public Sourabh Jain
2023-04-23 10:52 ` [PATCH v10 2/5] powerpc/crash: introduce a new config option CRASH_HOTPLUG Sourabh Jain
2023-04-24  9:57   ` Laurent Dufour
2023-04-24 15:00     ` Sourabh Jain
2023-04-23 10:52 ` [PATCH v10 3/5] powerpc/crash: add crash CPU hotplug support Sourabh Jain
2023-04-24  9:59   ` Laurent Dufour
2023-04-23 10:52 ` [PATCH v10 4/5] crash: forward memory_notify args to arch crash hotplug handler Sourabh Jain
2023-04-24  9:59   ` Laurent Dufour
2023-04-24 14:02   ` Eric DeVolder
2023-04-23 10:52 ` [PATCH v10 5/5] powerpc/kexec: add crash memory hotplug support Sourabh Jain
2023-04-24 10:00   ` Laurent Dufour
2023-04-24 14:05 ` [PATCH v10 0/5] PowerPC: In-kernel handling of CPU/Memory hotplug/online/offline events for kdump kernel Eric DeVolder
2023-04-24 15:13   ` Sourabh Jain [this message]

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=dfee1e13-01cb-e2f3-61cb-9f9c51f2a875@linux.ibm.com \
    --to=sourabhjain@linux.ibm.com \
    --cc=bhe@redhat.com \
    --cc=eric.devolder@oracle.com \
    --cc=hbathini@linux.ibm.com \
    --cc=kexec@lists.infradead.org \
    --cc=ldufour@linux.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=mpe@ellerman.id.au \
    /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;
as well as URLs for NNTP newsgroup(s).