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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham 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 0C8B3C4332B for ; Fri, 20 Mar 2020 13:13:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C5E9420754 for ; Fri, 20 Mar 2020 13:13:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5E9420754 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 576B36B0005; Fri, 20 Mar 2020 09:13:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 526B76B0006; Fri, 20 Mar 2020 09:13:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3EE376B0007; Fri, 20 Mar 2020 09:13:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0149.hostedemail.com [216.40.44.149]) by kanga.kvack.org (Postfix) with ESMTP id 239096B0005 for ; Fri, 20 Mar 2020 09:13:03 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id C493262EB for ; Fri, 20 Mar 2020 13:13:02 +0000 (UTC) X-FDA: 76615781004.02.ghost93_8ef525dddca5d X-HE-Tag: ghost93_8ef525dddca5d X-Filterd-Recvd-Size: 6507 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Fri, 20 Mar 2020 13:13:02 +0000 (UTC) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02KD3njf125797 for ; Fri, 20 Mar 2020 09:13:01 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2yua2dd6nk-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 20 Mar 2020 09:13:01 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 20 Mar 2020 13:12:59 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 20 Mar 2020 13:12:54 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02KDCrNQ57344206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 20 Mar 2020 13:12:53 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 31EFA11C050; Fri, 20 Mar 2020 13:12:53 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9749B11C058; Fri, 20 Mar 2020 13:12:50 +0000 (GMT) Received: from linux.vnet.ibm.com (unknown [9.126.150.29]) by d06av25.portsmouth.uk.ibm.com (Postfix) with SMTP; Fri, 20 Mar 2020 13:12:50 +0000 (GMT) Date: Fri, 20 Mar 2020 18:42:49 +0530 From: Srikar Dronamraju To: Vlastimil Babka Cc: Andrew Morton , linux-mm@kvack.org, Joonsoo Kim , Bharata B Rao , Christopher Lameter , David Rientjes , Kirill Tkhai , Mel Gorman , Michael Ellerman , Michal Hocko , Nathan Lynch , Pekka Enberg , PUVICHAKRAVARTHY RAMACHANDRAN , Sachin Sant Subject: Re: [PATCH 2/2] Revert "topology: add support for node_to_mem_node() to determine the fallback node" Reply-To: Srikar Dronamraju References: <20200320115533.9604-1-vbabka@suse.cz> <20200320115533.9604-2-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20200320115533.9604-2-vbabka@suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) X-TM-AS-GCONF: 00 x-cbid: 20032013-0012-0000-0000-000003947BE0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20032013-0013-0000-0000-000021D16538 Message-Id: <20200320131249.GC12944@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.645 definitions=2020-03-20_03:2020-03-20,2020-03-20 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 clxscore=1015 phishscore=0 priorityscore=1501 adultscore=0 bulkscore=0 spamscore=0 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003200056 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: * Vlastimil Babka [2020-03-20 12:55:33]: > This reverts commit ad2c8144418c6a81cefe65379fd47bbe8344cef2. > > The function node_to_mem_node() was introduced by that commit for use in SLUB > on systems with memoryless nodes, but it turned out to be unreliable on some > architectures/configurations and a simpler solution exists than fixing it up. > > Thus the previous commit "mm, slub: prevent kmalloc_node crashes and memory > leaks" removed the only user of node_to_mem_node() and we can revert the commit > that introduced it. > > Signed-off-by: Vlastimil Babka > Cc: Joonsoo Kim Reviewed-by: Srikar Dronamraju > --- > include/linux/topology.h | 17 ----------------- > mm/page_alloc.c | 1 - > 2 files changed, 18 deletions(-) > > diff --git a/include/linux/topology.h b/include/linux/topology.h > index eb2fe6edd73c..608fa4aadf0e 100644 > --- a/include/linux/topology.h > +++ b/include/linux/topology.h > @@ -130,20 +130,11 @@ static inline int numa_node_id(void) > * Use the accessor functions set_numa_mem(), numa_mem_id() and cpu_to_mem(). > */ > DECLARE_PER_CPU(int, _numa_mem_); > -extern int _node_numa_mem_[MAX_NUMNODES]; > > #ifndef set_numa_mem > static inline void set_numa_mem(int node) > { > this_cpu_write(_numa_mem_, node); > - _node_numa_mem_[numa_node_id()] = node; > -} > -#endif > - > -#ifndef node_to_mem_node > -static inline int node_to_mem_node(int node) > -{ > - return _node_numa_mem_[node]; > } > #endif > > @@ -166,7 +157,6 @@ static inline int cpu_to_mem(int cpu) > static inline void set_cpu_numa_mem(int cpu, int node) > { > per_cpu(_numa_mem_, cpu) = node; > - _node_numa_mem_[cpu_to_node(cpu)] = node; > } > #endif > > @@ -180,13 +170,6 @@ static inline int numa_mem_id(void) > } > #endif > > -#ifndef node_to_mem_node > -static inline int node_to_mem_node(int node) > -{ > - return node; > -} > -#endif > - > #ifndef cpu_to_mem > static inline int cpu_to_mem(int cpu) > { > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 3c4eb750a199..6e7e9c1d6caa 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -95,7 +95,6 @@ DEFINE_STATIC_KEY_TRUE(vm_numa_stat_key); > */ > DEFINE_PER_CPU(int, _numa_mem_); /* Kernel "local memory" node */ > EXPORT_PER_CPU_SYMBOL(_numa_mem_); > -int _node_numa_mem_[MAX_NUMNODES]; > #endif > > /* work_structs for global per-cpu drains */ > -- > 2.25.1 > -- Thanks and Regards Srikar Dronamraju