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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9A13D60D17 for ; Wed, 20 Nov 2024 09:42:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 28DAA6B007B; Wed, 20 Nov 2024 04:42:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 23E186B0083; Wed, 20 Nov 2024 04:42:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 104FA6B0085; Wed, 20 Nov 2024 04:42:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id E20AD6B007B for ; Wed, 20 Nov 2024 04:42:37 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 8FEFAA09C3 for ; Wed, 20 Nov 2024 09:42:37 +0000 (UTC) X-FDA: 82805983092.14.6E7026E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf19.hostedemail.com (Postfix) with ESMTP id 715271A0010 for ; Wed, 20 Nov 2024 09:41:31 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=SFa3JGgF; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf19.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732095689; a=rsa-sha256; cv=none; b=VayKS4VMj7bgHPOSn9CQF4WyoSzPC6anoOUaSm2dUfqRSvm6/mA8/Y9z5F4LyUyJFcho3A bVhG8vVH0ahjKBz5GZ7OYRy/rJkggsKYJBWjbjAS//6Ny5XLyVrYV4rTSy/sM56l1pq+xX QPlsU+J6rV3Ts2YxtOLYdqqWd0BP98E= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=SFa3JGgF; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf19.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732095689; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BtnWcCy/RhXE31KVrvFbhBplS1bhLk3pDVg35AMkfJY=; b=DUIe5hWZDlX0IjijCNkYR5C4WO26OEvqLRZExp1G0eel7vEGsM8yJ9yCUlEv3oWo6B61au 5Rl0TYtkiz0+YqPm/o7dedTGNYFvpbxX5McyXZTXSc4S1wr/O/FBOpXIrVlydj8D2cCFLS FJzxUym5qLoZeAnhKhaxM3P2BM1anZM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732095755; 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=BtnWcCy/RhXE31KVrvFbhBplS1bhLk3pDVg35AMkfJY=; b=SFa3JGgFffyR/3hvrW9iYeEMHJgTU8gcb2mDsls2+xrGPdX+XRru01t6kGBruqGoGGBXXY 9vD4AR3mDnzHsV9t921BWw6DqaxM3vrxpkDxOTA93YDUf7GG7EFI65ZRx74fgFFGGl8rnY hCRsDDBC617RTq5QUebFNIsko/Dlef4= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-163-MR-qE1QFOU6higATofrtoA-1; Wed, 20 Nov 2024 04:42:30 -0500 X-MC-Unique: MR-qE1QFOU6higATofrtoA-1 X-Mimecast-MFC-AGG-ID: MR-qE1QFOU6higATofrtoA Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4B67019560BA; Wed, 20 Nov 2024 09:42:27 +0000 (UTC) Received: from localhost (unknown [10.72.113.10]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5BE5319560A3; Wed, 20 Nov 2024 09:42:25 +0000 (UTC) Date: Wed, 20 Nov 2024 17:42:19 +0800 From: Baoquan He To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, virtualization@lists.linux.dev, kvm@vger.kernel.org, linux-fsdevel@vger.kernel.org, kexec@lists.infradead.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , Eugenio =?iso-8859-1?Q?P=E9rez?= , Vivek Goyal , Dave Young , Thomas Huth , Cornelia Huck , Janosch Frank , Claudio Imbrenda , Eric Farman , Andrew Morton Subject: Re: [PATCH v1 04/11] fs/proc/vmcore: move vmcore definitions from kcore.h to crash_dump.h Message-ID: References: <20241025151134.1275575-1-david@redhat.com> <20241025151134.1275575-5-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Rspam-User: X-Rspamd-Queue-Id: 715271A0010 X-Rspamd-Server: rspam01 X-Stat-Signature: i93enjo8uxgaq6ro9bs93c6o8ej8x685 X-HE-Tag: 1732095691-534200 X-HE-Meta: U2FsdGVkX1/SQssTl2s2llAGFAm5PFvZCbcxNLC7eBtjd7AmPkd17nHxKFmQL2mTOboTLYX9T8zH6mK8mITNSTb9oUSeI5eXxCV60CW65ndtcLM5K8bpk0TURjWW8bxD/u5b1eHkD12tXpB0zvTg7OI9Y9qYRsEpnnmKjb+4axzQu8foLbSwGcIcAfI+y0JK3Wr2F5OzOYORDCnO+ayPNFhySXsVBSkkRyI0UaV+o6qRJ1upt0/Rd8Rv38TyLIGEqkeIZisgqpYOM7R+vtWVguMuuTxLpWO4EfS7SgOUbbn70HkMM4+Ezefovbjg97Wdl48fKqB+lI9QCoY5gQ6TYMqvyouhNag8KDPq35q2ajbZwzUMr9jPkr/T4RxzvrbnMiLJ705CEICJp+I3eOcqNEa2XSzURfKK0bjT8lB+gbHic5HOyyKxGyUPTFQXP5bfVIDBZ9JdQv+jif6K0R4jjN5yDxpprV5u4Y9/Hmsw8YyHztGMp46B48yyqHb0QooZDoQLoCQm4Ly4BtgUj4lscZfwbqatTrLX8tfajv4QVtJKun7HDUQUAXzCA+Gn+O5JKOsloJJsHNavXCizj0kKuuK+RiiMtt6lToNg98D9iKtJPfwnM/E2SnlbgFrDgR6knzVE88LauZ6NG86kkD1n6EA9FzmarFZyAp/BoXrsVRnVSqH4Fs9A0dUazyO20t4bJd9ags7tKg3ebhbD28lgWrIggxG17EA8b3u/ZSyKbyD/ToADHi069na7Ir37ad4UyqZBydZT/FzqYMk3OHQnyIgH8yFm48iOyIlpf10WlkZURjpfSN2SsOH6whbJ2X1eXYG0MQQNfGtTbNAa90KaZSho7VNlrG1muhyoIxZxlE7Iy4Qs0UiPoXubtv7urxT3MwHnlDmU8UnjCq6iI8/T61uFiZtdlVoDEShqMetgh49XmphUSYYfs7QB69Q18FQf2WW1vD2IE3jGJcv3tbu eWymffq/ qO1AkrjqEXgxBGvOBlVfy8MYEYPP+rQZnIA9eZy+qnBIOuBN1jnstIsf1qhXal/rjFch+DJFzNgLqkcLEXF/p+cM2Jvkd2LYnW39ZEbs8+SbiuiR4EcN/PhcxgpH1PS46uX4paKVrKEHlfsg8fIUGwhjd0E1ICbFMx5oKSfhDB/GXeQjIw12xJARj2iGUoxEGfTQmHracb9S/ZEVDL0xwCd8JCqLDGmW8Q2J8ipi1V10DD8BuEIH2sgy8kwP7CU1c/sVBYCPYLqgnYQ/Hd61sTv2DxumUEIPh2PvApXR/zsSWTHn4s/7t/xFv6irJMeY6DiVbVPGlnu7XiIWHYQdKEhMNcU9tnQqYjCSyHnMvMd63hemUq3uWTyU+3/Zic1WCy1wN46fSRIyD3itfUHzIGAXw3A== 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: List-Subscribe: List-Unsubscribe: On 11/15/24 at 10:59am, David Hildenbrand wrote: > On 15.11.24 10:44, Baoquan He wrote: > > On 10/25/24 at 05:11pm, David Hildenbrand wrote: > > > These defines are not related to /proc/kcore, move them to crash_dump.h > > > instead. While at it, rename "struct vmcore" to "struct > > > vmcore_mem_node", which is a more fitting name. > > > > Agree it's inappropriate to put the defintions in kcore.h. However for > > 'struct vmcore', it's only used in fs/proc/vmcore.c from my code > > serching, do you think if we can put it in fs/proc/vmcore.c directly? > > And 'struct vmcoredd_node' too. > > See the next patches and how virtio-mem will make use of the feactored out > functions. Not putting them as inline functions into a header will require > exporting symbols just do add a vmcore memory node to the list, which I want > to avoid -- overkill for these simple helpers. I see. It makes sense to put them in crash_dump.h. Thanks for explanation. > > > > > And about the renaming, with my understanding each instance of struct > > vmcore represents one memory region, isn't it a little confusing to be > > called vmcore_mem_node? I understand you probablly want to unify the > > vmcore and vmcoredd's naming. I have to admit I don't know vmcoredd well > > and its naming, while most of people have been knowing vmcore representing > > memory region very well. > > I chose "vmcore_mem_node" because it is a memory range stored in a list. > Note the symmetry with "vmcoredd_node" I would say the justification of naming "vmcore_mem_node" is to keep symmetry with "vmcoredd_node". If because it is a memory range, it really should not be called vmcore_mem_node. As we know, memory node has specific meaning in kernel, it's the memory range existing on a NUMA node. And vmcoredd is not a widely used feature. At least in fedora/RHEL, we leave it to customers themselves to use and handle, we don't support it. And we add 'novmcoredd' to kdump kernel cmdline by default to disable it in fedora/RHEL. So a rarely used feature should not be taken to decide the naming of a mature and and widely used feature's name. My personal opinion. > > If there are strong feelings I can use a different name, but Yes, I would suggest we better keep the old name or take a more appropriate one if have to change. > "vmcore_mem_node" really describes what it actually is. Especially now that > we have different vmcore nodes. > > -- > Cheers, > > David / dhildenb >