From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mga09.intel.com ([134.134.136.24]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lOesz-00EggS-W5 for kexec@lists.infradead.org; Tue, 23 Mar 2021 11:07:48 +0000 Date: Tue, 23 Mar 2021 13:07:30 +0200 From: Andy Shevchenko Subject: Re: [PATCH v1 1/3] kernel/resource: make walk_system_ram_res() find all busy IORESOURCE_SYSTEM_RAM resources Message-ID: References: <20210322160200.19633-1-david@redhat.com> <20210322160200.19633-2-david@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Greg Kroah-Hartman , Dan Williams , Daniel Vetter , Mauro Carvalho Chehab , Dave Young , Baoquan He , Vivek Goyal , Dave Hansen , Keith Busch , Michal Hocko , Qian Cai , Oscar Salvador , Eric Biederman , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Tom Lendacky , Brijesh Singh , x86@kernel.org, kexec@lists.infradead.org On Tue, Mar 23, 2021 at 10:40:33AM +0100, David Hildenbrand wrote: > On 22.03.21 17:01, David Hildenbrand wrote: > > It used to be true that we can have busy system RAM only on the first level > > in the resourc tree. However, this is no longer holds for driver-managed > > system RAM (i.e., added via dax/kmem and virtio-mem), which gets added on > > lower levels. > > > > We have two users of walk_system_ram_res(), which currently only > > consideres the first level: > > a) kernel/kexec_file.c:kexec_walk_resources() -- We properly skip > > IORESOURCE_SYSRAM_DRIVER_MANAGED resources via > > locate_mem_hole_callback(), so even after this change, we won't be > > placing kexec images onto dax/kmem and virtio-mem added memory. No > > change. > > b) arch/x86/kernel/crash.c:fill_up_crash_elf_data() -- we're currently > > not adding relevant ranges to the crash elf info, resulting in them > > not getting dumped via kdump. > > > > This change fixes loading a crashkernel via kexec_file_load() and including > > dax/kmem and virtio-mem added System RAM in the crashdump on x86-64. Note > > that e.g,, arm64 relies on memblock data and, therefore, always considers > > all added System RAM already. > > > > Let's find all busy IORESOURCE_SYSTEM_RAM resources, making the function > > behave like walk_system_ram_range(). > > > > Cc: Andrew Morton > > Cc: Greg Kroah-Hartman > > Cc: Dan Williams > > Cc: Daniel Vetter > > Cc: Andy Shevchenko > > Cc: Mauro Carvalho Chehab > > Cc: Signed-off-by: David Hildenbrand > > ^ My copy-paste action when creating the cc list slipped in a duplicate SO > in all 3 patches. I can resend if desired. I think to address my comments you will need to resend anyway (as v2). -- With Best Regards, Andy Shevchenko _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec