* [PATCH] arch/s390: save_area_alloc default failure behavior changed to panic
@ 2025-01-09 3:31 Guo Weikang
2025-01-09 8:08 ` Alexander Gordeev
0 siblings, 1 reply; 8+ messages in thread
From: Guo Weikang @ 2025-01-09 3:31 UTC (permalink / raw)
To: Andrew Morton, Alexander Gordeev
Cc: linux-s390, linux-kernel, linux-mm, Guo Weikang
Now with the memblock_alloc_or_panic interface, save_area_alloc no longer
needs to handle panic itself.
Signed-off-by: Guo Weikang <guoweikang.kernel@gmail.com>
---
arch/s390/kernel/crash_dump.c | 4 +---
arch/s390/kernel/numa.c | 3 +--
arch/s390/kernel/smp.c | 4 ----
3 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c
index f699df2a2b11..276cb4c1e11b 100644
--- a/arch/s390/kernel/crash_dump.c
+++ b/arch/s390/kernel/crash_dump.c
@@ -63,9 +63,7 @@ struct save_area * __init save_area_alloc(bool is_boot_cpu)
{
struct save_area *sa;
- sa = memblock_alloc(sizeof(*sa), 8);
- if (!sa)
- return NULL;
+ sa = memblock_alloc_or_panic(sizeof(*sa), 8);
if (is_boot_cpu)
list_add(&sa->list, &dump_save_areas);
diff --git a/arch/s390/kernel/numa.c b/arch/s390/kernel/numa.c
index a33e20f73330..2fc40f97c0ad 100644
--- a/arch/s390/kernel/numa.c
+++ b/arch/s390/kernel/numa.c
@@ -21,9 +21,8 @@ void __init numa_setup(void)
nodes_clear(node_possible_map);
node_set(0, node_possible_map);
node_set_online(0);
- for (nid = 0; nid < MAX_NUMNODES; nid++) {
+ for (nid = 0; nid < MAX_NUMNODES; nid++)
NODE_DATA(nid) = memblock_alloc_or_panic(sizeof(pg_data_t), 8);
- }
NODE_DATA(0)->node_spanned_pages = memblock_end_of_DRAM() >> PAGE_SHIFT;
NODE_DATA(0)->node_id = 0;
}
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index d77aaefb59bd..7b08399b0846 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -611,8 +611,6 @@ void __init smp_save_dump_ipl_cpu(void)
if (!dump_available())
return;
sa = save_area_alloc(true);
- if (!sa)
- panic("could not allocate memory for boot CPU save area\n");
regs = memblock_alloc_or_panic(512, 8);
copy_oldmem_kernel(regs, __LC_FPREGS_SAVE_AREA, 512);
save_area_add_regs(sa, regs);
@@ -646,8 +644,6 @@ void __init smp_save_dump_secondary_cpus(void)
SIGP_CC_NOT_OPERATIONAL)
continue;
sa = save_area_alloc(false);
- if (!sa)
- panic("could not allocate memory for save area\n");
__pcpu_sigp_relax(addr, SIGP_STORE_STATUS_AT_ADDRESS, __pa(page));
save_area_add_regs(sa, page);
if (cpu_has_vx()) {
--
2.25.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arch/s390: save_area_alloc default failure behavior changed to panic
2025-01-09 3:31 [PATCH] arch/s390: save_area_alloc default failure behavior changed to panic Guo Weikang
@ 2025-01-09 8:08 ` Alexander Gordeev
2025-01-09 8:28 ` Weikang Guo
0 siblings, 1 reply; 8+ messages in thread
From: Alexander Gordeev @ 2025-01-09 8:08 UTC (permalink / raw)
To: Guo Weikang; +Cc: Andrew Morton, linux-s390, linux-kernel, linux-mm
On Thu, Jan 09, 2025 at 11:31:36AM +0800, Guo Weikang wrote:
Hi Guo,
> Now with the memblock_alloc_or_panic interface, save_area_alloc no longer
> needs to handle panic itself.
>
> Signed-off-by: Guo Weikang <guoweikang.kernel@gmail.com>
> ---
> arch/s390/kernel/crash_dump.c | 4 +---
> arch/s390/kernel/numa.c | 3 +--
> arch/s390/kernel/smp.c | 4 ----
> 3 files changed, 2 insertions(+), 9 deletions(-)
This patch is a follow-up to v7, but instead it needs to be part of v8.
I guess Andrew would refresh mm-everything (or whatever he finds appropriate)
with the new version.
@Andrew, please correct me if I am wroing.
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arch/s390: save_area_alloc default failure behavior changed to panic
2025-01-09 8:08 ` Alexander Gordeev
@ 2025-01-09 8:28 ` Weikang Guo
2025-01-09 13:56 ` Alexander Gordeev
0 siblings, 1 reply; 8+ messages in thread
From: Weikang Guo @ 2025-01-09 8:28 UTC (permalink / raw)
To: Alexander Gordeev; +Cc: Andrew Morton, linux-s390, linux-kernel, linux-mm
Hi, Alexander
>
> Alexander Gordeev <agordeev@linux.ibm.com> wrote on Thursday, 9 January 2025 16:08
>
> On Thu, Jan 09, 2025 at 11:31:36AM +0800, Guo Weikang wrote:
>
> Hi Guo,
>
> > Now with the memblock_alloc_or_panic interface, save_area_alloc no longer
> > needs to handle panic itself.
> >
> > Signed-off-by: Guo Weikang <guoweikang.kernel@gmail.com>
> > ---
> > arch/s390/kernel/crash_dump.c | 4 +---
> > arch/s390/kernel/numa.c | 3 +--
> > arch/s390/kernel/smp.c | 4 ----
> > 3 files changed, 2 insertions(+), 9 deletions(-)
>
> This patch is a follow-up to v7, but instead it needs to be part of v8.
> I guess Andrew would refresh mm-everything (or whatever he finds appropriate)
> with the new version.
Sorry to confuse you, `memblock_alloc_or_panic` is already merged
into mm/mm-everything
by Andrew, so this is an additional patch specifically to fix the
problem you mentioned.
This patch is based on the latest mm/mm-everything branch, and it has
also been merged
by Andrew,You should have received the email.
@Alexander I hope I cleared your confusion. ^ ^
>
> @Andrew, please correct me if I am wroing.
>
> Thanks!
Best regards.
---
Guo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arch/s390: save_area_alloc default failure behavior changed to panic
2025-01-09 8:28 ` Weikang Guo
@ 2025-01-09 13:56 ` Alexander Gordeev
2025-01-09 14:53 ` Weikang Guo
0 siblings, 1 reply; 8+ messages in thread
From: Alexander Gordeev @ 2025-01-09 13:56 UTC (permalink / raw)
To: Weikang Guo, Andrew Morton; +Cc: linux-s390, linux-kernel, linux-mm
On Thu, Jan 09, 2025 at 04:28:06PM +0800, Weikang Guo wrote:
> > This patch is a follow-up to v7, but instead it needs to be part of v8.
> > I guess Andrew would refresh mm-everything (or whatever he finds appropriate)
> > with the new version.
>
> Sorry to confuse you, `memblock_alloc_or_panic` is already merged
> into mm/mm-everything
> by Andrew, so this is an additional patch specifically to fix the
> problem you mentioned.
>
> This patch is based on the latest mm/mm-everything branch, and it has
> also been merged
> by Andrew,You should have received the email.
>
> @Alexander I hope I cleared your confusion. ^ ^
I do not think I am confused. The merged patch is not good enough for s390.
This patch addresses my comments, but it needs to be merged into v7 or re-
posted as v8.
@Andrew, is that still possible?
> > @Andrew, please correct me if I am wroing.
> >
> > Thanks!
>
>
> Best regards.
> ---
> Guo
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arch/s390: save_area_alloc default failure behavior changed to panic
2025-01-09 13:56 ` Alexander Gordeev
@ 2025-01-09 14:53 ` Weikang Guo
2025-01-10 0:43 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: Weikang Guo @ 2025-01-09 14:53 UTC (permalink / raw)
To: Alexander Gordeev; +Cc: Andrew Morton, linux-s390, linux-kernel, linux-mm
Alexander Gordeev <agordeev@linux.ibm.com> wrote on Thursday, 9
January 2025 21:56:
>
> On Thu, Jan 09, 2025 at 04:28:06PM +0800, Weikang Guo wrote:
> > > This patch is a follow-up to v7, but instead it needs to be part of v8.
> > > I guess Andrew would refresh mm-everything (or whatever he finds appropriate)
> > > with the new version.
> >
> > Sorry to confuse you, `memblock_alloc_or_panic` is already merged
> > into mm/mm-everything
> > by Andrew, so this is an additional patch specifically to fix the
> > problem you mentioned.
> >
> > This patch is based on the latest mm/mm-everything branch, and it has
> > also been merged
> > by Andrew,You should have received the email.
> >
> > @Alexander I hope I cleared your confusion. ^ ^
>
> I do not think I am confused. The merged patch is not good enough for s390.
> This patch addresses my comments, but it needs to be merged into v7 or re-
> posted as v8.
>
I understand your point, you want to modify directly based on the
original patch.
If we repost it,it may not be v8 but v9.
Last v8 patch: https://lkml.kernel.org/r/20250102072528.650926-1-guoweikang.kernel@gmail.com
I reduced the recipients for V8 because I remembered that the number
of CCs might
have exceeded the limit at the time, and there hadn't been any
comments on V7 for a long time
> @Andrew, is that still possible?
@Andrew, I can cooperate if necessary, I could merge them into one
patch and repost.
> > > @Andrew, please correct me if I am wrong.
> > >
> > > Thanks!
> >
> >
> > Best regards.
> > ---
> > Guo
>
> Thanks!
---
Guo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arch/s390: save_area_alloc default failure behavior changed to panic
2025-01-09 14:53 ` Weikang Guo
@ 2025-01-10 0:43 ` Andrew Morton
2025-01-10 6:48 ` Weikang Guo
2025-01-10 7:45 ` Alexander Gordeev
0 siblings, 2 replies; 8+ messages in thread
From: Andrew Morton @ 2025-01-10 0:43 UTC (permalink / raw)
To: Weikang Guo
Cc: Alexander Gordeev, linux-s390, linux-kernel, linux-mm, Mike Rapoport
On Thu, 9 Jan 2025 22:53:57 +0800 Weikang Guo <guoweikang.kernel@gmail.com> wrote:
> I understand your point, you want to modify directly based on the
> original patch.
> If we repost it,it may not be v8 but v9.
>
> Last v8 patch: https://lkml.kernel.org/r/20250102072528.650926-1-guoweikang.kernel@gmail.com
>
> I reduced the recipients for V8 because I remembered that the number
> of CCs might
> have exceeded the limit at the time, and there hadn't been any
> comments on V7 for a long time
>
> > @Andrew, is that still possible?
>
> @Andrew, I can cooperate if necessary, I could merge them into one
> patch and repost.
I'll fold this patch ("arch/s390: save_area_alloc default failure
behavior changed to panic") into
"mm-memblock-add-memblock_alloc_or_panic-interface.patch", v8 before
sending the latter upstream.
But I'm not sure that we've completed the review discussion of
"mm/memblock: add memblock_alloc_or_panic interface" with Mike?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arch/s390: save_area_alloc default failure behavior changed to panic
2025-01-10 0:43 ` Andrew Morton
@ 2025-01-10 6:48 ` Weikang Guo
2025-01-10 7:45 ` Alexander Gordeev
1 sibling, 0 replies; 8+ messages in thread
From: Weikang Guo @ 2025-01-10 6:48 UTC (permalink / raw)
To: Andrew Morton
Cc: Alexander Gordeev, linux-s390, linux-kernel, linux-mm, Mike Rapoport
Andrew Morton <akpm@linux-foundation.org> wrote on Friday, 10 January
2025 08:43:
>
> On Thu, 9 Jan 2025 22:53:57 +0800 Weikang Guo <guoweikang.kernel@gmail.com> wrote:
>
> > I understand your point, you want to modify directly based on the
> > original patch.
> > If we repost it,it may not be v8 but v9.
> >
> > Last v8 patch: https://lkml.kernel.org/r/20250102072528.650926-1-guoweikang.kernel@gmail.com
> >
> > I reduced the recipients for V8 because I remembered that the number
> > of CCs might
> > have exceeded the limit at the time, and there hadn't been any
> > comments on V7 for a long time
> >
> > > @Andrew, is that still possible?
> >
> > @Andrew, I can cooperate if necessary, I could merge them into one
> > patch and repost.
>
> I'll fold this patch ("arch/s390: save_area_alloc default failure
> behavior changed to panic") into
> "mm-memblock-add-memblock_alloc_or_panic-interface.patch", v8 before
> sending the latter upstream.
>
Andrew, I appreciate your help with this!
> But I'm not sure that we've completed the review discussion of
> "mm/memblock: add memblock_alloc_or_panic interface" with Mike?
Here is Mike's latest feedback on the patch, I have recorded it in the
v8 changelog:
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Links: https://lore.kernel.org/lkml/Z2fknmnNtiZbCc7x@kernel.org/
Thanks!
---
Guo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arch/s390: save_area_alloc default failure behavior changed to panic
2025-01-10 0:43 ` Andrew Morton
2025-01-10 6:48 ` Weikang Guo
@ 2025-01-10 7:45 ` Alexander Gordeev
1 sibling, 0 replies; 8+ messages in thread
From: Alexander Gordeev @ 2025-01-10 7:45 UTC (permalink / raw)
To: Andrew Morton
Cc: Weikang Guo, linux-s390, linux-kernel, linux-mm, Mike Rapoport
On Thu, Jan 09, 2025 at 04:43:15PM -0800, Andrew Morton wrote:
Hi Andrew,
> I'll fold this patch ("arch/s390: save_area_alloc default failure
> behavior changed to panic") into
> "mm-memblock-add-memblock_alloc_or_panic-interface.patch", v8 before
> sending the latter upstream.
To s390 bits of the folded patch:
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-01-10 7:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-09 3:31 [PATCH] arch/s390: save_area_alloc default failure behavior changed to panic Guo Weikang
2025-01-09 8:08 ` Alexander Gordeev
2025-01-09 8:28 ` Weikang Guo
2025-01-09 13:56 ` Alexander Gordeev
2025-01-09 14:53 ` Weikang Guo
2025-01-10 0:43 ` Andrew Morton
2025-01-10 6:48 ` Weikang Guo
2025-01-10 7:45 ` Alexander Gordeev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox