linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/3] kernel/resource: make walk_system_ram_res() and walk_mem_res() search the whole tree
@ 2021-03-22 16:01 David Hildenbrand
  2021-03-22 16:01 ` [PATCH v1 1/3] kernel/resource: make walk_system_ram_res() find all busy IORESOURCE_SYSTEM_RAM resources David Hildenbrand
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: David Hildenbrand @ 2021-03-22 16:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mm, David Hildenbrand, Andrew Morton, Andy Shevchenko,
	Baoquan He, Borislav Petkov, Brijesh Singh, Daniel Vetter,
	Dan Williams, Dave Hansen, Dave Young, Eric Biederman,
	Greg Kroah-Hartman, H. Peter Anvin, Ingo Molnar, Keith Busch,
	Mauro Carvalho Chehab, Michal Hocko, Oscar Salvador, Qian Cai,
	Thomas Gleixner, Tom Lendacky, Vivek Goyal

Playing with kdump+virtio-mem I noticed that kexec_file_load() does not
consider System RAM added via dax/kmem and virtio-mem when preparing the
elf header for kdump. Looking into the details, the logic used in
walk_system_ram_res() and walk_mem_res() seems to be outdated.

walk_system_ram_range() already does the right thing, let's change
walk_system_ram_res() and walk_mem_res(), and clean up.

Loading a kdump kernel via "kexec -p -s" ... will result in the kdump
kernel to also dump dax/kmem and virtio-mem added System RAM now.

Note: kexec-tools on x86-64 also have to be updated to consider this
memory in the kexec_load() case when processing /proc/iomem.

Against next-20210322.

David Hildenbrand (3):
  kernel/resource: make walk_system_ram_res() find all busy
    IORESOURCE_SYSTEM_RAM resources
  kernel/resource: make walk_mem_res() find all busy IORESOURCE_MEM
    resources
  kernel/resource: remove first_lvl / siblings_only logic

 kernel/resource.c | 45 ++++++++++++---------------------------------
 1 file changed, 12 insertions(+), 33 deletions(-)

-- 
2.29.2



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

end of thread, other threads:[~2021-03-24 11:28 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22 16:01 [PATCH v1 0/3] kernel/resource: make walk_system_ram_res() and walk_mem_res() search the whole tree David Hildenbrand
2021-03-22 16:01 ` [PATCH v1 1/3] kernel/resource: make walk_system_ram_res() find all busy IORESOURCE_SYSTEM_RAM resources David Hildenbrand
2021-03-22 16:10   ` Dan Williams
2021-03-23  9:40   ` David Hildenbrand
2021-03-23 11:07     ` Andy Shevchenko
2021-03-23 11:06   ` Andy Shevchenko
2021-03-23 11:25     ` David Hildenbrand
2021-03-23 14:33   ` Baoquan He
2021-03-24 11:18   ` Oscar Salvador
2021-03-24 11:28     ` David Hildenbrand
2021-03-22 16:01 ` [PATCH v1 2/3] kernel/resource: make walk_mem_res() find all busy IORESOURCE_MEM resources David Hildenbrand
2021-03-22 16:11   ` Dan Williams
2021-03-23 11:08   ` Andy Shevchenko
2021-03-23 11:26     ` David Hildenbrand
2021-03-22 16:02 ` [PATCH v1 3/3] kernel/resource: remove first_lvl / siblings_only logic David Hildenbrand
2021-03-22 16:12   ` Dan Williams
2021-03-23 11:11   ` Andy Shevchenko
2021-03-23 11:19     ` David Hildenbrand
2021-03-23 11:05 ` [PATCH v1 0/3] kernel/resource: make walk_system_ram_res() and walk_mem_res() search the whole tree Andy Shevchenko

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