From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9F49C433DB for ; Tue, 23 Mar 2021 11:25:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6F6E6619B8 for ; Tue, 23 Mar 2021 11:25:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F6E6619B8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DFC766B015E; Tue, 23 Mar 2021 07:25:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DB8866B0160; Tue, 23 Mar 2021 07:25:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BFF2A6B0161; Tue, 23 Mar 2021 07:25:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0108.hostedemail.com [216.40.44.108]) by kanga.kvack.org (Postfix) with ESMTP id 9DE6D6B015E for ; Tue, 23 Mar 2021 07:25:47 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 633F41802DDF4 for ; Tue, 23 Mar 2021 11:25:47 +0000 (UTC) X-FDA: 77950909134.36.157573C Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 665EBC0007C3 for ; Tue, 23 Mar 2021 11:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616498745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b4th3W1WuDCglHfKhIGbTRrg+iSR4HR4i9tFQs60ItI=; b=RKLVriP3MGRTjVCDLz/X+qPXNSPftgjgMfQeHtG3We1JDOZmtchLZjMV4S4VoSiiGUcdBA VcD72TUcg/RLBp2JaIQskl+uqOWbWrwdJAWsdz84CLc/JD0Km+mF3VIGLAEzaw+WQ/3SWC Wkuv4ZVPctYUZQvCpCDJ0dmoYR8oJkM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-U3Yo1Md9M7GloIpZ9fJkiQ-1; Tue, 23 Mar 2021 07:25:41 -0400 X-MC-Unique: U3Yo1Md9M7GloIpZ9fJkiQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DB20880006E; Tue, 23 Mar 2021 11:25:38 +0000 (UTC) Received: from [10.36.115.54] (ovpn-115-54.ams2.redhat.com [10.36.115.54]) by smtp.corp.redhat.com (Postfix) with ESMTP id 63509179B3; Tue, 23 Mar 2021 11:25:28 +0000 (UTC) To: Andy Shevchenko 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 References: <20210322160200.19633-1-david@redhat.com> <20210322160200.19633-2-david@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Subject: Re: [PATCH v1 1/3] kernel/resource: make walk_system_ram_res() find all busy IORESOURCE_SYSTEM_RAM resources Message-ID: <73a96145-848d-66ea-4d45-fb759003d1de@redhat.com> Date: Tue, 23 Mar 2021 12:25:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Stat-Signature: tp8zheta68ipxwao4g96tnmrzhk4bcpq X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 665EBC0007C3 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf03; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=170.10.133.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616498745-934269 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 23.03.21 12:06, Andy Shevchenko wrote: > On Mon, Mar 22, 2021 at 05:01:58PM +0100, 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-manag= ed >> 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 the= m >> not getting dumped via kdump. >> >> This change fixes loading a crashkernel via kexec_file_load() and incl= uding >=20 > "...fixes..." effectively means to me that Fixes tag should be provided= . We can certainly add, although it doesn't really affect the running=20 kernel, but only crashdumps taken in the kdump kernel: Fixes: ebf71552bb0e ("virtio-mem: Add parent resource for all added=20 "System RAM"") Fixes: c221c0b0308f ("device-dax: "Hotplug" persistent memory for use=20 like normal RAM") Thanks --=20 Thanks, David / dhildenb