All of lore.kernel.org
 help / color / mirror / Atom feed
* IO memory read from /proc/vmcore leads to hang.
@ 2016-07-11 21:46 Daniel Walker
  2016-07-15  7:23 ` Mahesh Jagannath Salgaonkar
  2016-07-20 19:18 ` Daniel Walker
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel Walker @ 2016-07-11 21:46 UTC (permalink / raw)
  To: kexec, xe-kernel


Hi,

I found found that on my Powerpc machine there is some IO memory which 
will cause the box to hang if I read it. It's a custom device that was 
added to the board for a special purpose.

I was looking for a way to exclude this memory from the dump, and while 
doing that I found that kexec makes a list of memory segments that go 
into the core file. I was wondering why most of the kexec architecture 
don't appear to exclude device memory like what's listed in /proc/iomem.

Is there a good reason why that's not the case?

Daniel

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

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

* Re: IO memory read from /proc/vmcore leads to hang.
  2016-07-11 21:46 IO memory read from /proc/vmcore leads to hang Daniel Walker
@ 2016-07-15  7:23 ` Mahesh Jagannath Salgaonkar
  2016-07-20 19:18 ` Daniel Walker
  1 sibling, 0 replies; 9+ messages in thread
From: Mahesh Jagannath Salgaonkar @ 2016-07-15  7:23 UTC (permalink / raw)
  To: kexec

On 07/12/2016 03:16 AM, Daniel Walker wrote:
> 
> Hi,
> 
> I found found that on my Powerpc machine there is some IO memory which
> will cause the box to hang if I read it. It's a custom device that was
> added to the board for a special purpose.
> 
> I was looking for a way to exclude this memory from the dump, and while
> doing that I found that kexec makes a list of memory segments that go
> into the core file. I was wondering why most of the kexec architecture
> don't appear to exclude device memory like what's listed in /proc/iomem.
> 
> Is there a good reason why that's not the case?

Kexec/Kdump is designed to capture entire old kernel's memory that will
be available in /proc/vmcore. There is a different userspace tool called
'makedumpfile' (https://sourceforge.net/projects/makedumpfile/), which
can be used to exclude certain memory pages from the dump while reading
from /proc/vmcore. See if that helps you.

Thanks,
-Mahesh.

> 
> Daniel
> 
> _______________________________________________
> 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] 9+ messages in thread

* Re: IO memory read from /proc/vmcore leads to hang.
  2016-07-11 21:46 IO memory read from /proc/vmcore leads to hang Daniel Walker
  2016-07-15  7:23 ` Mahesh Jagannath Salgaonkar
@ 2016-07-20 19:18 ` Daniel Walker
  2016-07-21  7:34   ` Maxim Uvarov
  1 sibling, 1 reply; 9+ messages in thread
From: Daniel Walker @ 2016-07-20 19:18 UTC (permalink / raw)
  To: kexec, xe-kernel, mahesh


Mahesh, I didn't get your email for some reason . I saw it in the Archives.

makedumpfile doesn't appear to have a way to drop free form memory 
areas. So I need to drop 00800000 to 00807fff , but I don't see a way to 
do that. Any other suggestions on how to prevent this hang ?



On 07/11/2016 02:46 PM, Daniel Walker wrote:
>
> Hi,
>
> I found found that on my Powerpc machine there is some IO memory which 
> will cause the box to hang if I read it. It's a custom device that was 
> added to the board for a special purpose.
>
> I was looking for a way to exclude this memory from the dump, and 
> while doing that I found that kexec makes a list of memory segments 
> that go into the core file. I was wondering why most of the kexec 
> architecture don't appear to exclude device memory like what's listed 
> in /proc/iomem.
>
> Is there a good reason why that's not the case?
>
> Daniel


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

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

* Re: IO memory read from /proc/vmcore leads to hang.
  2016-07-20 19:18 ` Daniel Walker
@ 2016-07-21  7:34   ` Maxim Uvarov
  2016-07-21 15:19     ` Daniel Walker
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Uvarov @ 2016-07-21  7:34 UTC (permalink / raw)
  To: Daniel Walker; +Cc: xe-kernel, kexec

Second kernel should already know that it's not system ram of the
first kernel and in that case makedumpfile will not dump that memory.
Simple way is to pass additional kernel argument to kexec is when you
load the kernel. If it works than you can think how it's better to
pass this parameter.  Variants might be request_resource() in first
kernel or add some logic to kexec tools.

Best regards,
Maxim.

2016-07-20 22:18 GMT+03:00 Daniel Walker <danielwa@cisco.com>:
>
> Mahesh, I didn't get your email for some reason . I saw it in the Archives.
>
> makedumpfile doesn't appear to have a way to drop free form memory areas. So
> I need to drop 00800000 to 00807fff , but I don't see a way to do that. Any
> other suggestions on how to prevent this hang ?
>
>
>
> On 07/11/2016 02:46 PM, Daniel Walker wrote:
>>
>>
>> Hi,
>>
>> I found found that on my Powerpc machine there is some IO memory which
>> will cause the box to hang if I read it. It's a custom device that was added
>> to the board for a special purpose.
>>
>> I was looking for a way to exclude this memory from the dump, and while
>> doing that I found that kexec makes a list of memory segments that go into
>> the core file. I was wondering why most of the kexec architecture don't
>> appear to exclude device memory like what's listed in /proc/iomem.
>>
>> Is there a good reason why that's not the case?
>>
>> Daniel
>
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec



-- 
Best regards,
Maxim Uvarov

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

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

* Re: IO memory read from /proc/vmcore leads to hang.
  2016-07-21  7:34   ` Maxim Uvarov
@ 2016-07-21 15:19     ` Daniel Walker
  2016-07-21 19:33       ` Maxim Uvarov
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Walker @ 2016-07-21 15:19 UTC (permalink / raw)
  To: Maxim Uvarov; +Cc: xe-kernel, kexec


  There appears to be no code which checks what is or is not System ram, 
there is nothing that checks the device tree to see what is IO memory, 
and nothing reads /proc/iomem .. So AFAIK nothing cares if it's IO 
memory, or system ram, and there's no method to config things to skip 
any memory in the system, except in makedumpfile which can skip symbols 
not IO memory.


On 07/21/2016 12:34 AM, Maxim Uvarov wrote:
> Second kernel should already know that it's not system ram of the
> first kernel and in that case makedumpfile will not dump that memory.
> Simple way is to pass additional kernel argument to kexec is when you
> load the kernel. If it works than you can think how it's better to
> pass this parameter.  Variants might be request_resource() in first
> kernel or add some logic to kexec tools.
>
> Best regards,
> Maxim.
>
> 2016-07-20 22:18 GMT+03:00 Daniel Walker <danielwa@cisco.com>:
>> Mahesh, I didn't get your email for some reason . I saw it in the Archives.
>>
>> makedumpfile doesn't appear to have a way to drop free form memory areas. So
>> I need to drop 00800000 to 00807fff , but I don't see a way to do that. Any
>> other suggestions on how to prevent this hang ?
>>
>>
>>
>> On 07/11/2016 02:46 PM, Daniel Walker wrote:
>>>
>>> Hi,
>>>
>>> I found found that on my Powerpc machine there is some IO memory which
>>> will cause the box to hang if I read it. It's a custom device that was added
>>> to the board for a special purpose.
>>>
>>> I was looking for a way to exclude this memory from the dump, and while
>>> doing that I found that kexec makes a list of memory segments that go into
>>> the core file. I was wondering why most of the kexec architecture don't
>>> appear to exclude device memory like what's listed in /proc/iomem.
>>>
>>> Is there a good reason why that's not the case?
>>>
>>> Daniel
>>
>>
>> _______________________________________________
>> 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] 9+ messages in thread

* Re: IO memory read from /proc/vmcore leads to hang.
  2016-07-21 15:19     ` Daniel Walker
@ 2016-07-21 19:33       ` Maxim Uvarov
  2016-07-21 20:04         ` Daniel Walker
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Uvarov @ 2016-07-21 19:33 UTC (permalink / raw)
  To: Daniel Walker; +Cc: xe-kernel, kexec

2016-07-21 18:19 GMT+03:00 Daniel Walker <danielwa@cisco.com>:
>
>  There appears to be no code which checks what is or is not System ram,
> there is nothing that checks the device tree to see what is IO memory, and
> nothing reads /proc/iomem .. So AFAIK nothing cares if it's IO memory, or
> system ram, and there's no method to config things to skip any memory in the
> system, except in makedumpfile which can skip symbols not IO memory.
>
>

Daniel,  unfortunately it's long time for me when I looked to powerpc
code. But I just
checked that here:

kexec-tools-2.0.6/kexec/arch/ppc64/kexec-ppc64.c

is probably what you need.

Maxim.

>
> On 07/21/2016 12:34 AM, Maxim Uvarov wrote:
>>
>> Second kernel should already know that it's not system ram of the
>> first kernel and in that case makedumpfile will not dump that memory.
>> Simple way is to pass additional kernel argument to kexec is when you
>> load the kernel. If it works than you can think how it's better to
>> pass this parameter.  Variants might be request_resource() in first
>> kernel or add some logic to kexec tools.
>>
>> Best regards,
>> Maxim.
>>
>> 2016-07-20 22:18 GMT+03:00 Daniel Walker <danielwa@cisco.com>:
>>>
>>> Mahesh, I didn't get your email for some reason . I saw it in the
>>> Archives.
>>>
>>> makedumpfile doesn't appear to have a way to drop free form memory areas.
>>> So
>>> I need to drop 00800000 to 00807fff , but I don't see a way to do that.
>>> Any
>>> other suggestions on how to prevent this hang ?
>>>
>>>
>>>
>>> On 07/11/2016 02:46 PM, Daniel Walker wrote:
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I found found that on my Powerpc machine there is some IO memory which
>>>> will cause the box to hang if I read it. It's a custom device that was
>>>> added
>>>> to the board for a special purpose.
>>>>
>>>> I was looking for a way to exclude this memory from the dump, and while
>>>> doing that I found that kexec makes a list of memory segments that go
>>>> into
>>>> the core file. I was wondering why most of the kexec architecture don't
>>>> appear to exclude device memory like what's listed in /proc/iomem.
>>>>
>>>> Is there a good reason why that's not the case?
>>>>
>>>> Daniel
>>>
>>>
>>>
>>> _______________________________________________
>>> kexec mailing list
>>> kexec@lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/kexec
>>
>>
>>
>



-- 
Best regards,
Maxim Uvarov

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

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

* Re: IO memory read from /proc/vmcore leads to hang.
  2016-07-21 19:33       ` Maxim Uvarov
@ 2016-07-21 20:04         ` Daniel Walker
  2016-07-22 11:11           ` Maxim Uvarov
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Walker @ 2016-07-21 20:04 UTC (permalink / raw)
  To: Maxim Uvarov; +Cc: xe-kernel, kexec

On 07/21/2016 12:33 PM, Maxim Uvarov wrote:
> 2016-07-21 18:19 GMT+03:00 Daniel Walker <danielwa@cisco.com>:
>>   There appears to be no code which checks what is or is not System ram,
>> there is nothing that checks the device tree to see what is IO memory, and
>> nothing reads /proc/iomem .. So AFAIK nothing cares if it's IO memory, or
>> system ram, and there's no method to config things to skip any memory in the
>> system, except in makedumpfile which can skip symbols not IO memory.
>>
>>
> Daniel,  unfortunately it's long time for me when I looked to powerpc
> code. But I just
> checked that here:
>
> kexec-tools-2.0.6/kexec/arch/ppc64/kexec-ppc64.c
>
> is probably what you need.

I have a powerpc32 .. In the powerpc64 file I only see something called 
"reserved-ranges" which may do what I want, however, that doesn't exist 
in the 32bit version.  It appers the reserved-ranges is used by OPAL 
firmware , which I don't have. There doesn't appear to be anything 
generic in ppc64 to exclude device IO memory.

Daniel

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

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

* Re: IO memory read from /proc/vmcore leads to hang.
  2016-07-21 20:04         ` Daniel Walker
@ 2016-07-22 11:11           ` Maxim Uvarov
  2016-07-25 17:06             ` Daniel Walker
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Uvarov @ 2016-07-22 11:11 UTC (permalink / raw)
  To: Daniel Walker; +Cc: xe-kernel, kexec

I might be wrong but as I remember powerpc32 is deprecated in
kexec-tools and all code use ppc64 directory even for 32 bit code...

2016-07-21 23:04 GMT+03:00 Daniel Walker <danielwa@cisco.com>:
> On 07/21/2016 12:33 PM, Maxim Uvarov wrote:
>>
>> 2016-07-21 18:19 GMT+03:00 Daniel Walker <danielwa@cisco.com>:
>>>
>>>   There appears to be no code which checks what is or is not System ram,
>>> there is nothing that checks the device tree to see what is IO memory,
>>> and
>>> nothing reads /proc/iomem .. So AFAIK nothing cares if it's IO memory, or
>>> system ram, and there's no method to config things to skip any memory in
>>> the
>>> system, except in makedumpfile which can skip symbols not IO memory.
>>>
>>>
>> Daniel,  unfortunately it's long time for me when I looked to powerpc
>> code. But I just
>> checked that here:
>>
>> kexec-tools-2.0.6/kexec/arch/ppc64/kexec-ppc64.c
>>
>> is probably what you need.
>
>
> I have a powerpc32 .. In the powerpc64 file I only see something called
> "reserved-ranges" which may do what I want, however, that doesn't exist in
> the 32bit version.  It appers the reserved-ranges is used by OPAL firmware ,
> which I don't have. There doesn't appear to be anything generic in ppc64 to
> exclude device IO memory.
>
> Daniel



-- 
Best regards,
Maxim Uvarov

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

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

* Re: IO memory read from /proc/vmcore leads to hang.
  2016-07-22 11:11           ` Maxim Uvarov
@ 2016-07-25 17:06             ` Daniel Walker
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Walker @ 2016-07-25 17:06 UTC (permalink / raw)
  To: Maxim Uvarov; +Cc: xe-kernel, kexec


This doesn't appear to be the case. As of 2.0.6 ppc32 is still used. I 
don't see any changesets in the git tree that would change that for 
later versions.


On 07/22/2016 04:11 AM, Maxim Uvarov wrote:
> I might be wrong but as I remember powerpc32 is deprecated in
> kexec-tools and all code use ppc64 directory even for 32 bit code...
>
> 2016-07-21 23:04 GMT+03:00 Daniel Walker <danielwa@cisco.com>:
>> On 07/21/2016 12:33 PM, Maxim Uvarov wrote:
>>> 2016-07-21 18:19 GMT+03:00 Daniel Walker <danielwa@cisco.com>:
>>>>    There appears to be no code which checks what is or is not System ram,
>>>> there is nothing that checks the device tree to see what is IO memory,
>>>> and
>>>> nothing reads /proc/iomem .. So AFAIK nothing cares if it's IO memory, or
>>>> system ram, and there's no method to config things to skip any memory in
>>>> the
>>>> system, except in makedumpfile which can skip symbols not IO memory.
>>>>
>>>>
>>> Daniel,  unfortunately it's long time for me when I looked to powerpc
>>> code. But I just
>>> checked that here:
>>>
>>> kexec-tools-2.0.6/kexec/arch/ppc64/kexec-ppc64.c
>>>
>>> is probably what you need.
>>
>> I have a powerpc32 .. In the powerpc64 file I only see something called
>> "reserved-ranges" which may do what I want, however, that doesn't exist in
>> the 32bit version.  It appers the reserved-ranges is used by OPAL firmware ,
>> which I don't have. There doesn't appear to be anything generic in ppc64 to
>> exclude device IO memory.
>>
>> Daniel
>
>


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

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

end of thread, other threads:[~2016-07-25 17:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-11 21:46 IO memory read from /proc/vmcore leads to hang Daniel Walker
2016-07-15  7:23 ` Mahesh Jagannath Salgaonkar
2016-07-20 19:18 ` Daniel Walker
2016-07-21  7:34   ` Maxim Uvarov
2016-07-21 15:19     ` Daniel Walker
2016-07-21 19:33       ` Maxim Uvarov
2016-07-21 20:04         ` Daniel Walker
2016-07-22 11:11           ` Maxim Uvarov
2016-07-25 17:06             ` Daniel Walker

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.