Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8475380ybl; Tue, 24 Dec 2019 23:20:17 -0800 (PST) X-Google-Smtp-Source: APXvYqxRKaHDgM9x1Vx4XcCg+XGa0pFHT/ZKH9DWX98DhKUWgLLe5VwWukhsPOtS2NHOgGuEbeYK X-Received: by 2002:a05:6830:3001:: with SMTP id a1mr32382798otn.254.1577258416936; Tue, 24 Dec 2019 23:20:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577258416; cv=none; d=google.com; s=arc-20160816; b=m009KmdAf1ArF6WoDDQETFCK2NYi6Wc5PkV4TyUWt6ujnFh4zeuI31kL+or8Dizk9o fMd8KA8fa3wcE+yO1kfXVwZs6Y9eHRMUe32QXQ4RFSSDXj3qiPOGyYGX0uNygdVNg6mL d/W65Wr69cOHdl7ZhtFlRW4XzOa2FRJPTgF79MQGjJm55uwwIkWWypeZooCXrjVroeoM G7x9pxkkp6LggaOqGKEBJFRaIcfq/qnmmD+//VHtGOCQqpjMXbk6bPlkMOih6ii9O1bh /tVUmGzJXzJa1jn2qxCgOazU66F+ZuQ+eB9lzBuGjxCkZbb1u+9YbLaRoYi9U8rfrLzU FRbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=xL/ShzqmK+fdXFZ8cvAFgi6FxlFBuujEZnDwxTOQeWk=; b=LOeXLeHXHI6LXq0BNdI877aBMJNUIN1QLVyK/+SdJ/gSLIUa6UzBrXK0RMwYIoB81+ 4gm6aurJ/4VkkBb2XRQz9u5zFph/87HdFlnXO9uklSTSqA5XN62sCGDcemxG7h6JLeEO Ni+vuXmyxL5fleX0mElyzX6gzSJzU++BR/AUlNeCnerlg01SfX0/2f51C6x5d03G7WA/ qTtN8SEJ0u0k8fvamDC+A07RWjso1Lk0rOiGtcHMe2hurQKysPlneoj7SzqK9ZTJ+N+q Cr2tXqXtMWVHrx/+D87xG99aL0KLmoXI22bF44gtefl8lpxlaPs3PMYBGsSXrcLyn7gP Yk4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=DCLt52pO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r25si8041819otp.280.2019.12.24.23.19.53; Tue, 24 Dec 2019 23:20:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=DCLt52pO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726415AbfLYHSl (ORCPT + 99 others); Wed, 25 Dec 2019 02:18:41 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:60738 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbfLYHSl (ORCPT ); Wed, 25 Dec 2019 02:18:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xL/ShzqmK+fdXFZ8cvAFgi6FxlFBuujEZnDwxTOQeWk=; b=DCLt52pOPxfiGYTHJ1thRI2R0 XZc0HDmgcULjW63q7xC8UyAyDqlrcVwy7UxzYCN690hHnK3k0VqnnrqQOw6svzBwXlmOORjrYepGq AnhggJ+Es0O/3za2DU6wte4ed5sEzpjhb1L/VgTwoS6Mlm4QgJr2/PyeMV+mlGYDnA1PVMq+pwApc OTnz+is44y2QupqKzL1GP2b8DLCk7Mdr2kFfK74wsjWi+hZRCoTiNdv509q3dnlmc6+jPNxQ3kjqf 7Emxqug9FEgI+YojGt4Gk+CPZYXOS65d1xDQKFsbGwd3WrchHOm0mM6QRpTKyA+ejtV1itFWR4rMj xUGWCrlqg==; Received: from [2601:1c0:6280:3f0::fee9] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1ik0wI-0002Pr-LZ; Wed, 25 Dec 2019 07:18:38 +0000 Subject: Re: [PATCH 1/1] Fix undefined reference to 'node_reclaim_distance'. To: Matt Fleming , Gonsolo Cc: Geert Uytterhoeven , Yoshinori Sato , Rich Felker , Andrew Morton , Mike Rapoport , Nicholas Piggin , Linux-sh list , Linux Kernel Mailing List References: <20191216103522.32215-1-gonsolo@gmail.com> <20191216103522.32215-2-gonsolo@gmail.com> <20191223164220.GA14394@codeblueprint.co.uk> From: Randy Dunlap Message-ID: <29b721c1-b5a7-6fc1-4471-f42109d509ed@infradead.org> Date: Tue, 24 Dec 2019 23:18:37 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <20191223164220.GA14394@codeblueprint.co.uk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/23/19 8:42 AM, Matt Fleming wrote: > On Mon, 16 Dec, at 02:50:49PM, Gonsolo wrote: >>> The offending commit seems to be a55c7454a8c887b2 ("sched/topology: >>> Improve load balancing on AMD EPYC systems"). >>> >>> Probably the node_reclaim_distance variable should be moved from >>> an SMP-specific file to a NUMA-specific file. >> >> There are two variables that are used elsewhere: >> >> int sched_max_numa_distance; >> >> Used in kernel/sched/fair.c and kernel/sched/topology.c. I would move >> it to fair.c. >> >> int __read_mostly node_reclaim_distance = RECLAIM_DISTANCE; >> >> Used in >> arch/x86/kernel/cpu/amd.c, line 894 >> kernel/sched/topology.c >> mm/khugepaged.c, line 725 >> mm/page_alloc.c, line 3529 >> >> I'm not sure where to move this one. > > Can someone test out this patch on one of the failing architectures? > (sh, ppc64) Yes, it fixes the arch/sh/ build errors in my testing. I don't have a failing ppc64 .config file to test. thanks. > ---->8---- > > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c > index 6ec1e595b1d4..bf20e5883026 100644 > --- a/kernel/sched/topology.c > +++ b/kernel/sched/topology.c > @@ -1281,7 +1281,6 @@ static int sched_domains_curr_level; > int sched_max_numa_distance; > static int *sched_domains_numa_distance; > static struct cpumask ***sched_domains_numa_masks; > -int __read_mostly node_reclaim_distance = RECLAIM_DISTANCE; > #endif > > /* > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 4785a8a2040e..733890d913ea 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -3523,6 +3523,7 @@ bool zone_watermark_ok_safe(struct zone *z, unsigned int order, > } > > #ifdef CONFIG_NUMA > +int __read_mostly node_reclaim_distance = RECLAIM_DISTANCE; > static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone) > { > return node_distance(zone_to_nid(local_zone), zone_to_nid(zone)) <= > -- ~Randy Reported-by: Randy Dunlap