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=-7.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 9E075C433E1 for ; Mon, 13 Jul 2020 06:58:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6BB3220663 for ; Mon, 13 Jul 2020 06:58:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BB3220663 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D78808D0006; Mon, 13 Jul 2020 02:58:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D29268D0002; Mon, 13 Jul 2020 02:58:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C20C38D0006; Mon, 13 Jul 2020 02:58:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id AB4418D0002 for ; Mon, 13 Jul 2020 02:58:22 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 37CC8180AD801 for ; Mon, 13 Jul 2020 06:58:22 +0000 (UTC) X-FDA: 77032148844.20.scent61_081658826ee6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 0ECF2180C0609 for ; Mon, 13 Jul 2020 06:58:22 +0000 (UTC) X-HE-Tag: scent61_081658826ee6 X-Filterd-Recvd-Size: 5125 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Mon, 13 Jul 2020 06:58:21 +0000 (UTC) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06D5WLk6054775; Mon, 13 Jul 2020 02:58:12 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 32771wky9x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Jul 2020 02:58:12 -0400 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06D6PkkL195365; Mon, 13 Jul 2020 02:58:11 -0400 Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com with ESMTP id 32771wky9m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Jul 2020 02:58:11 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06D6lDl5025511; Mon, 13 Jul 2020 06:58:09 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma06ams.nl.ibm.com with ESMTP id 3274pgsvre-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Jul 2020 06:58:09 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06D6w7xu7012664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 13 Jul 2020 06:58:07 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8359FA405B; Mon, 13 Jul 2020 06:58:07 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 71B74A4062; Mon, 13 Jul 2020 06:58:04 +0000 (GMT) Received: from linux.ibm.com (unknown [9.148.203.145]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 13 Jul 2020 06:58:04 +0000 (GMT) Date: Mon, 13 Jul 2020 09:58:01 +0300 From: Mike Rapoport To: Dan Williams Cc: linux-nvdimm@lists.01.org, Jia He , Will Deacon , David Hildenbrand , Andrew Morton , peterz@infradead.org, vishal.l.verma@intel.com, dave.hansen@linux.intel.com, ard.biesheuvel@linaro.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, hch@lst.de, joao.m.martins@oracle.com Subject: Re: [PATCH v2 07/22] numa: Introduce a generic memory_add_physaddr_to_nid() Message-ID: <20200713065801.GB11000@linux.ibm.com> References: <159457116473.754248.7879464730875147365.stgit@dwillia2-desk3.amr.corp.intel.com> <159457120334.754248.12908401960465408733.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <159457120334.754248.12908401960465408733.stgit@dwillia2-desk3.amr.corp.intel.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-13_03:2020-07-10,2020-07-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxscore=0 mlxlogscore=971 impostorscore=0 malwarescore=0 suspectscore=0 adultscore=0 clxscore=1011 bulkscore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007130037 X-Rspamd-Queue-Id: 0ECF2180C0609 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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: Hi Dan, On Sun, Jul 12, 2020 at 09:26:43AM -0700, Dan Williams wrote: > For architectures that opt into storing their numa data in memblock > (only ARM64 currently), add a memblock generic way to interrogate that > data for memory_add_physaddr_to_nid(). This requires ARCH_KEEP_MEMBLOCK > to keep memblock text and data around after boot. I afraid we are too far from using memblock as a generic placeholder for numa data. Although all architectures now have the numa info in memblock, only arm64 uses memblock as the primary source of that data. I'd rather prefer Jia's solution [1] to have a weak default for memory_add_physaddr_to_nid() and let architectures override it. [1] https://lore.kernel.org/lkml/20200710031619.18762-2-justin.he@arm.com > Cc: Mike Rapoport > Cc: Jia He > Cc: Will Deacon > Cc: David Hildenbrand > Cc: Andrew Morton > Signed-off-by: Dan Williams > --- > include/linux/mm.h | 11 +++++++++++ > mm/Kconfig | 6 ++++++ > mm/page_alloc.c | 23 ++++++++++++++++++++++- > 3 files changed, 39 insertions(+), 1 deletion(-) > -- Sincerely yours, Mike.