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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 D0B6DC4708F for ; Wed, 2 Jun 2021 05:23:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6740061360 for ; Wed, 2 Jun 2021 05:23:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6740061360 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 EDFE96B006C; Wed, 2 Jun 2021 01:23:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E7D206B006E; Wed, 2 Jun 2021 01:23:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D1D836B0070; Wed, 2 Jun 2021 01:23:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0131.hostedemail.com [216.40.44.131]) by kanga.kvack.org (Postfix) with ESMTP id A488E6B006C for ; Wed, 2 Jun 2021 01:23:15 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 35094181AC9CB for ; Wed, 2 Jun 2021 05:23:15 +0000 (UTC) X-FDA: 78207640350.03.CA0C7BA Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf11.hostedemail.com (Postfix) with ESMTP id E9628200109A for ; Wed, 2 Jun 2021 05:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622611394; 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=l55W7bIxW0wl/QN0OmeznpSfL2au6N3qY2w60LTECMg=; b=S7wIufhfT7kV8HHdMySxKs71f2e6MgM3KQSO9K6Au8AnDp3Lga3CchcWr8jwU4hYz36M9I tIO02vjLOeTIjkittDPIQLD9fY5nGC8bOpfbx9S2dBOUa/Tv4vsuEZOCbQdHsyQAKvr/iJ 3FH9GMsQYjn1tIHnroaJYCaF1fUTuJY= 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-578-DMDq7yAXNEaGgu7A-4GjhQ-1; Wed, 02 Jun 2021 01:23:10 -0400 X-MC-Unique: DMDq7yAXNEaGgu7A-4GjhQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3A9BB501E5; Wed, 2 Jun 2021 05:23:09 +0000 (UTC) Received: from localhost (ovpn-13-33.pek2.redhat.com [10.72.13.33]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA75F6A03A; Wed, 2 Jun 2021 05:23:01 +0000 (UTC) Date: Wed, 2 Jun 2021 13:22:59 +0800 From: Baoquan He To: HAGIO =?utf-8?B?S0FaVUhJVE8o6JCp5bC+44CA5LiA5LuBKQ==?= Cc: Andrew Morton , David Hildenbrand , Dong Aisheng , Dong Aisheng , "linux-mm@kvack.org" , open list , Dave Young , Vivek Goyal , "kexec@lists.infradead.org" Subject: Re: [PATCH V2 4/6] mm: rename the global section array to mem_sections Message-ID: <20210602052259.GB409140@MiWiFi-R3L-srv> References: <20210531091908.1738465-1-aisheng.dong@nxp.com> <20210531091908.1738465-5-aisheng.dong@nxp.com> <42617372-c846-85fe-4739-abbe55eca8f6@redhat.com> <20210601165246.99d7374d07661b7e91e49cb6@linux-foundation.org> <20210602030353.GA409140@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=S7wIufhf; spf=none (imf11.hostedemail.com: domain of bhe@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: E9628200109A X-Stat-Signature: ame5fx565aqfaz67k1xb1uu8gednj78x X-HE-Tag: 1622611378-474748 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 06/02/21 at 05:02am, HAGIO KAZUHITO(=E8=90=A9=E5=B0=BE =E4=B8=80=E4=BB= =81) wrote: > -----Original Message----- > > On 06/02/21 at 01:11am, HAGIO KAZUHITO(=E8=90=A9=E5=B0=BE =E4=B8=80=E4= =BB=81) wrote: > > > -----Original Message----- > > > > On Tue, 1 Jun 2021 10:40:09 +0200 David Hildenbrand wrote: > > > > > > > > > > Thanks, i explained the reason during my last reply. > > > > > > Andrew has already picked this patch to -mm tree. > > > > > > > > > > Just because it's in Andrews tree doesn't mean it will end up u= pstream. ;) > > > > > > > > > > Anyhow, no really strong opinion, it's simply unnecessary code = churn > > > > > that makes bisecting harder without real value IMHO. > > > > > > > > I think it's a good change - mem_sections refers to multiple inst= ances > > > > of a mem_section. Churn is a pain, but that's the price we pay f= or more > > > > readable code. And for having screwed it up originally ;) > > > > > > From a makedumpfile/crash-utility viewpoint, I don't deny kernel im= provement > > > and probably the change will not be hard for them to support, but I= 'd like > > > you to remember that the tool users will need to update them for th= e change. > >=20 > > As VIM user, I can understand Aisheng's feeling on the mem_section > > variable which has the same symbol name as its type. Meanwhile it doe= s > > cause makedumpfile/crash having to be changed accordingly. > >=20 > > Maybe we can carry it when any essential change is needed in both ker= nel > > and makedumpfile/crash around it. >=20 > Yes, that is a possible option. >=20 > >=20 > > > > > > The situation where we need to update the tools for new kernels is = usual, but > > > there are not many cases that they cannot even start session, and t= his change > >=20 > > By the way, Kazu, about a case starting session, could you be more sp= ecific > > or rephrase? I may not get it clearly. Thanks. >=20 > As for the current crash, the "mem_section" symbol is used to determine > which memory model is used. >=20 > if (kernel_symbol_exists("mem_section")) > vt->flags |=3D SPARSEMEM; > else if (kernel_symbol_exists("mem_map")) { > get_symbol_data("mem_map", sizeof(char *), &vt->mem_map= ); > vt->flags |=3D FLATMEM; > } else > vt->flags |=3D DISCONTIGMEM; >=20 > So without updating, crash will assume that the memory model is DISCONT= IGMEM, > fail during vm_init() and cannot start a session. This is an imitation= of > the situation though: >=20 > - if (kernel_symbol_exists("mem_section")) > + if (kernel_symbol_exists("mem_sectionX")) >=20 > # crash > ... > crash: invalid structure member offset: pglist_data_node_mem_map > FILE: memory.c LINE: 16420 FUNCTION: dump_memory_nodes() >=20 > [/root/bin/crash] error trace: 465304 =3D> 4ac2bf =3D> 4aae19 =3D> 57f4= d7 >=20 > 57f4d7: OFFSET_verify+164 > 4aae19: dump_memory_nodes+5321 > 4ac2bf: vm_init+4031 > 465304: main_loop+392 >=20 > # >=20 > Every time a kernel is released, there are some changes that crash can > start up with but cannot run a specific crash's command, but a change > that crash cannot start up like this case does not occur often. Ah,I see. You mean this patch will cause startup failure of crash/makedum= pfile during application's earlier stage, and this is a severer situation than others. Then we may need defer the patch acceptance to a future suitable time. Thanks for explanation. >=20 > Also as for makedumpfile, the "SYMBOL(mem_section)" vmcore entry is use= d > to determine the memory model, so it will fail with the following error > without an update. >=20 > # ./makedumpfile --mem-usage /proc/kcore=20 > get_mem_map: Can't distinguish the memory type. >=20 > makedumpfile Failed. >=20 > Thanks, > Kazu