All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ppc64: remove rma_top limit
@ 2022-09-15  8:42 Sourabh Jain
  2022-09-16 10:58 ` Hari Bathini
  2022-09-20  7:14 ` Coiby Xu
  0 siblings, 2 replies; 8+ messages in thread
From: Sourabh Jain @ 2022-09-15  8:42 UTC (permalink / raw)
  To: kexec; +Cc: horms, hbathini, Sourabh Jain

Restricting kexec tool to allocate hole for kexec segments below 768MB
may not be relavent now since first memory block size can be 1024MB and
more.

Removing rma_top restriction will give more space to find holes for
kexec segments and existing in-place checks make sure that kexec segment
allocation doesn't cross the first memory block because every kexec segment
has to be within first memory block for kdump kernel to boot properly.

Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
---
 kexec/arch/ppc64/kexec-ppc64.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
index 5b17740..611809f 100644
--- a/kexec/arch/ppc64/kexec-ppc64.c
+++ b/kexec/arch/ppc64/kexec-ppc64.c
@@ -717,8 +717,6 @@ static int get_devtree_details(unsigned long kexec_flags)
 			if (base < rma_base) {
 				rma_base = base;
 				rma_top = base + be64_to_cpu(((uint64_t *)buf)[1]);
-				if (rma_top > 0x30000000UL)
-					rma_top = 0x30000000UL;
 			}
 
 			fclose(file);
-- 
2.37.3


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] ppc64: remove rma_top limit
  2022-09-15  8:42 [PATCH] ppc64: remove rma_top limit Sourabh Jain
@ 2022-09-16 10:58 ` Hari Bathini
  2022-09-20  4:51   ` Sourabh Jain
  2022-09-20  7:14 ` Coiby Xu
  1 sibling, 1 reply; 8+ messages in thread
From: Hari Bathini @ 2022-09-16 10:58 UTC (permalink / raw)
  To: Sourabh Jain, kexec; +Cc: horms



On 15/09/22 2:12 pm, Sourabh Jain wrote:
> Restricting kexec tool to allocate hole for kexec segments below 768MB
> may not be relavent now since first memory block size can be 1024MB and
> more.
> 
> Removing rma_top restriction will give more space to find holes for
> kexec segments and existing in-place checks make sure that kexec segment
> allocation doesn't cross the first memory block because every kexec segment
> has to be within first memory block for kdump kernel to boot properly.
> 
> Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>

Yeah. The restriction seems arbitrary. Even more so since commit
47478ea66d43 ("kexec-tools: ppc64: fix how RMA top is deduced")
with which kexec_load was sure to place all segments within the
first memory block. So, the change looks good to me.

Acked-by: Hari Bathini <hbathini@linux.ibm.com>

> ---
>   kexec/arch/ppc64/kexec-ppc64.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
> index 5b17740..611809f 100644
> --- a/kexec/arch/ppc64/kexec-ppc64.c
> +++ b/kexec/arch/ppc64/kexec-ppc64.c
> @@ -717,8 +717,6 @@ static int get_devtree_details(unsigned long kexec_flags)
>   			if (base < rma_base) {
>   				rma_base = base;
>   				rma_top = base + be64_to_cpu(((uint64_t *)buf)[1]);
> -				if (rma_top > 0x30000000UL)
> -					rma_top = 0x30000000UL;
>   			}
> 
>   			fclose(file);

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ppc64: remove rma_top limit
  2022-09-16 10:58 ` Hari Bathini
@ 2022-09-20  4:51   ` Sourabh Jain
  0 siblings, 0 replies; 8+ messages in thread
From: Sourabh Jain @ 2022-09-20  4:51 UTC (permalink / raw)
  To: Hari Bathini, kexec; +Cc: horms


On 16/09/22 16:28, Hari Bathini wrote:
>
>
> On 15/09/22 2:12 pm, Sourabh Jain wrote:
>> Restricting kexec tool to allocate hole for kexec segments below 768MB
>> may not be relavent now since first memory block size can be 1024MB and
>> more.
>>
>> Removing rma_top restriction will give more space to find holes for
>> kexec segments and existing in-place checks make sure that kexec segment
>> allocation doesn't cross the first memory block because every kexec 
>> segment
>> has to be within first memory block for kdump kernel to boot properly.
>>
>> Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
>
> Yeah. The restriction seems arbitrary. Even more so since commit
> 47478ea66d43 ("kexec-tools: ppc64: fix how RMA top is deduced")
> with which kexec_load was sure to place all segments within the
> first memory block. So, the change looks good to me.
>
> Acked-by: Hari Bathini <hbathini@linux.ibm.com>

Thank you!

Sourabh Jain


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ppc64: remove rma_top limit
  2022-09-15  8:42 [PATCH] ppc64: remove rma_top limit Sourabh Jain
  2022-09-16 10:58 ` Hari Bathini
@ 2022-09-20  7:14 ` Coiby Xu
  2022-09-24 12:10   ` Simon Horman
  2022-09-28 10:42   ` Sourabh Jain
  1 sibling, 2 replies; 8+ messages in thread
From: Coiby Xu @ 2022-09-20  7:14 UTC (permalink / raw)
  To: Sourabh Jain; +Cc: kexec, horms, hbathini

Hi,

I'm curious to ask which bug this patch is going to fix. I tested it
yesterday and it doesn't fix
https://bugzilla.redhat.com/show_bug.cgi?id=2126409.

On Thu, Sep 15, 2022 at 02:12:40PM +0530, Sourabh Jain wrote:
>Restricting kexec tool to allocate hole for kexec segments below 768MB
>may not be relavent now since first memory block size can be 1024MB and
>more.
>
>Removing rma_top restriction will give more space to find holes for
>kexec segments and existing in-place checks make sure that kexec segment
>allocation doesn't cross the first memory block because every kexec segment
>has to be within first memory block for kdump kernel to boot properly.
>
>Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
>---
> kexec/arch/ppc64/kexec-ppc64.c | 2 --
> 1 file changed, 2 deletions(-)
>
>diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
>index 5b17740..611809f 100644
>--- a/kexec/arch/ppc64/kexec-ppc64.c
>+++ b/kexec/arch/ppc64/kexec-ppc64.c
>@@ -717,8 +717,6 @@ static int get_devtree_details(unsigned long kexec_flags)
> 			if (base < rma_base) {
> 				rma_base = base;
> 				rma_top = base + be64_to_cpu(((uint64_t *)buf)[1]);
>-				if (rma_top > 0x30000000UL)
>-					rma_top = 0x30000000UL;
> 			}
>
> 			fclose(file);
>-- 
>2.37.3
>
>
>_______________________________________________
>kexec mailing list
>kexec@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/kexec
>

-- 
Best regards,
Coiby


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ppc64: remove rma_top limit
  2022-09-20  7:14 ` Coiby Xu
@ 2022-09-24 12:10   ` Simon Horman
  2022-09-29  6:49     ` Sourabh Jain
  2022-09-28 10:42   ` Sourabh Jain
  1 sibling, 1 reply; 8+ messages in thread
From: Simon Horman @ 2022-09-24 12:10 UTC (permalink / raw)
  To: Coiby Xu; +Cc: Sourabh Jain, kexec, hbathini

Hi Sourabh,

could you address this question?
It would be good to know before applying this patch.

Thanks in advance,
Simon

On Tue, Sep 20, 2022 at 03:14:47PM +0800, Coiby Xu wrote:
> Hi,
> 
> I'm curious to ask which bug this patch is going to fix. I tested it
> yesterday and it doesn't fix
> https://bugzilla.redhat.com/show_bug.cgi?id=2126409.
> 
> On Thu, Sep 15, 2022 at 02:12:40PM +0530, Sourabh Jain wrote:
> > Restricting kexec tool to allocate hole for kexec segments below 768MB
> > may not be relavent now since first memory block size can be 1024MB and
> > more.
> > 
> > Removing rma_top restriction will give more space to find holes for
> > kexec segments and existing in-place checks make sure that kexec segment
> > allocation doesn't cross the first memory block because every kexec segment
> > has to be within first memory block for kdump kernel to boot properly.
> > 
> > Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
> > ---
> > kexec/arch/ppc64/kexec-ppc64.c | 2 --
> > 1 file changed, 2 deletions(-)
> > 
> > diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
> > index 5b17740..611809f 100644
> > --- a/kexec/arch/ppc64/kexec-ppc64.c
> > +++ b/kexec/arch/ppc64/kexec-ppc64.c
> > @@ -717,8 +717,6 @@ static int get_devtree_details(unsigned long kexec_flags)
> > 			if (base < rma_base) {
> > 				rma_base = base;
> > 				rma_top = base + be64_to_cpu(((uint64_t *)buf)[1]);
> > -				if (rma_top > 0x30000000UL)
> > -					rma_top = 0x30000000UL;
> > 			}
> > 
> > 			fclose(file);
> > -- 
> > 2.37.3
> > 
> > 
> > _______________________________________________
> > kexec mailing list
> > kexec@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kexec
> > 
> 
> -- 
> Best regards,
> Coiby
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
> 

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ppc64: remove rma_top limit
  2022-09-20  7:14 ` Coiby Xu
  2022-09-24 12:10   ` Simon Horman
@ 2022-09-28 10:42   ` Sourabh Jain
  1 sibling, 0 replies; 8+ messages in thread
From: Sourabh Jain @ 2022-09-28 10:42 UTC (permalink / raw)
  To: Coiby Xu; +Cc: kexec, horms, hbathini

Hello Coiby,

> Hi,
>
> I'm curious to ask which bug this patch is going to fix. I tested it
> yesterday and it doesn't fix
> https://bugzilla.redhat.com/show_bug.cgi?id=2126409.

This patch doesn't fix the above bug, instead it enables kexec tool
to look for memory holes for kexec segments beyond 768MB (an arbitrary 
limit).

It is helpful for the case where the segments could not accommodated below
768MB due to bigger kernel/initrd/FDT size.

Thanks,
Sourabh Jain


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ppc64: remove rma_top limit
  2022-09-24 12:10   ` Simon Horman
@ 2022-09-29  6:49     ` Sourabh Jain
  2022-10-05 15:20       ` Simon Horman
  0 siblings, 1 reply; 8+ messages in thread
From: Sourabh Jain @ 2022-09-29  6:49 UTC (permalink / raw)
  To: Simon Horman, Coiby Xu; +Cc: kexec, hbathini

Hello Simon,

On 24/09/22 17:40, Simon Horman wrote:
> Hi Sourabh,
>
> could you address this question?
> It would be good to know before applying this patch.
Apologies for the delayed response, query is answered now.

Thanks,
Sourabh Jain

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ppc64: remove rma_top limit
  2022-09-29  6:49     ` Sourabh Jain
@ 2022-10-05 15:20       ` Simon Horman
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Horman @ 2022-10-05 15:20 UTC (permalink / raw)
  To: Sourabh Jain; +Cc: Simon Horman, Coiby Xu, kexec, hbathini

On Thu, Sep 29, 2022 at 12:19:30PM +0530, Sourabh Jain wrote:
> Hello Simon,
> 
> On 24/09/22 17:40, Simon Horman wrote:
> > Hi Sourabh,
> > 
> > could you address this question?
> > It would be good to know before applying this patch.
> Apologies for the delayed response, query is answered now.

Thanks, and likewise sorry for the delay.

I've applied this patch.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-05 15:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-15  8:42 [PATCH] ppc64: remove rma_top limit Sourabh Jain
2022-09-16 10:58 ` Hari Bathini
2022-09-20  4:51   ` Sourabh Jain
2022-09-20  7:14 ` Coiby Xu
2022-09-24 12:10   ` Simon Horman
2022-09-29  6:49     ` Sourabh Jain
2022-10-05 15:20       ` Simon Horman
2022-09-28 10:42   ` Sourabh Jain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.