Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1050726pxm; Wed, 23 Feb 2022 16:53:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6A6H5hYtEnXzkwZlMhQAzxvE0AG5gxvsV+a2F5p718UukBii97v0WbCiwk9EvSjX/Cooz X-Received: by 2002:a63:535a:0:b0:373:d239:7c7d with SMTP id t26-20020a63535a000000b00373d2397c7dmr308333pgl.483.1645663983153; Wed, 23 Feb 2022 16:53:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645663983; cv=none; d=google.com; s=arc-20160816; b=qDjUwGKRxfrgoWUENEh1wKyPporfHGoJLDlHiKYZnwvcgGrOfHq213YL1oZMRcvui8 ojZWddryWbGOdFYtgeuSpUEJTNKJTV3VCTNkLsf2XejE0PmijkGWjtju+W8SeU8XDuoL hvgB3ffVfz0B1PkGbjaE7MnvffVk/CyIl9i20Cy3zGWhzSD5bfKEPGTrmhNg3Zu42Q/A Uw/rEIlZk2v8Wjnz9DlDJCxysGG08LbEknw7utCaiQpxVCqlAxEBx2JYHn6NRUwipodU rYE7J2/ldFNnRjaKoWKU65ICI5cZWNpwqjBd3InseKGENWTEEnPh7uTV3D5gd/LGtW4v NRog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0YexfALl2Wt+vo+ZGpAgjDTpbBXv3xskm09mPqFwieQ=; b=Gmr005NMdChwRdvc3WDHIN2ruhObFROV8j/X4hH5uQxEKyPzUt+tojCp7TGVSWo+QM X/0u14aGOqEc7OZuBYDIRcFTCksCel4NeaU0Y6ONbYDfz6D9+ZT4WtBKngwEiXpXncqo nqAYQIY0pzL1FjA61FuKIukKzhXIyevxE4eyY1d1avS6aB2twmoHKQd3OnodJv51HkWG 7v+muFIPPY0NMh+s4DJMafgN9MFjsAxMYVVS0ySmSQfE0MFywUYuUd6JSJ/sx8+tlq7R r//FNWEpmtBsH/6Y9MS1azJZ4HU5IPUB9wBDN1fL6rx6fP9DUBX0GcO7SD0mSxqoUGAU +3MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GnzSZ+Ok; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x13si1080123pge.535.2022.02.23.16.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 16:53:03 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GnzSZ+Ok; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1BE3432EC4; Wed, 23 Feb 2022 16:46:51 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236839AbiBWDZ6 (ORCPT + 99 others); Tue, 22 Feb 2022 22:25:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230404AbiBWDZ4 (ORCPT ); Tue, 22 Feb 2022 22:25:56 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2F3A6527CA for ; Tue, 22 Feb 2022 19:25:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645586728; 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: in-reply-to:in-reply-to:references:references; bh=0YexfALl2Wt+vo+ZGpAgjDTpbBXv3xskm09mPqFwieQ=; b=GnzSZ+OkkjUaTSs3BQBlgqInJNrWtsF3DoQFeY7ZVhSLLgDED3NxQT2btxCUXHmRd7vNu/ c7aruo51gmFBNfBkyTQx14+s08LGsFbyhNrd0ytbT6Zv9/66GCesgG+aQ4ULEMeJMM4E7j +fJYflH6Zlk38aCxW9nYNxvDZk4wvQY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-639-sHoXl5fiNV-y26G_P-nA2A-1; Tue, 22 Feb 2022 22:25:27 -0500 X-MC-Unique: sHoXl5fiNV-y26G_P-nA2A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 79B16801AAD; Wed, 23 Feb 2022 03:25:24 +0000 (UTC) Received: from localhost (ovpn-14-1.pek2.redhat.com [10.72.14.1]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E3A684CECC; Wed, 23 Feb 2022 03:25:14 +0000 (UTC) Date: Wed, 23 Feb 2022 11:25:11 +0800 From: Baoquan He To: Eric DeVolder Cc: linux-kernel@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, ebiederm@xmission.com, dyoung@redhat.com, vgoyal@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, nramas@linux.microsoft.com, thomas.lendacky@amd.com, robh@kernel.org, efault@gmx.de, rppt@kernel.org, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com Subject: Re: [PATCH v4 02/10] crash hp: Introduce CRASH_HOTPLUG configuration options Message-ID: References: <20220209195706.51522-1-eric.devolder@oracle.com> <20220209195706.51522-3-eric.devolder@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209195706.51522-3-eric.devolder@oracle.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/09/22 at 02:56pm, Eric DeVolder wrote: > Support for CPU and memory hotplug for crash is controlled by the > CRASH_HOTPLUG configuration option, introduced by this patch. > > The CRASH_HOTPLUG_ELFCOREHDR_SZ related configuration option is > also introduced with this patch. > > Signed-off-by: Eric DeVolder > --- > arch/x86/Kconfig | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index ebe8fc76949a..4e3374edab02 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -2060,6 +2060,32 @@ config CRASH_DUMP > (CONFIG_RELOCATABLE=y). > For more details see Documentation/admin-guide/kdump/kdump.rst > > +config CRASH_HOTPLUG > + bool "kernel updates of crash elfcorehdr" > + depends on CRASH_DUMP && (HOTPLUG_CPU || MEMORY_HOTPLUG) && KEXEC_FILE > + help > + Enable the kernel to update the crash elfcorehdr (which contains > + the list of CPUs and memory regions) directly when hot plug/unplug > + of CPUs or memory. Otherwise userspace must monitor these hot > + plug/unplug change notifications via udev in order to > + unload-then-reload the crash kernel so that the list of CPUs and > + memory regions is kept up-to-date. Note that the udev CPU and > + memory change notifications still occur (however, userspace is not > + required to monitor for crash dump purposes). > + > +config CRASH_HOTPLUG_ELFCOREHDR_SZ > + depends on CRASH_HOTPLUG > + int > + default 131072 > + help > + Specify the maximum size of the elfcorehdr buffer/segment. > + The 128KiB default is sized so that it can accommodate 2048 > + Elf64_Phdr, where each Phdr represents either a CPU or a > + region of memory. > + For example, this size can accommodate hotplugging a machine > + with up to 1024 CPUs and up to 1024 memory regions (e.g. 1TiB > + with 1024 1GiB memory DIMMs). This example of memory could be a little misleading. The memory regions may not be related to memory DIMMs. System could split them into many smaller regions during bootup. Otherwise, this patch looks good to me. > + > config KEXEC_JUMP > bool "kexec jump" > depends on KEXEC && HIBERNATION > -- > 2.27.0 >