Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp270253pxb; Sat, 21 Aug 2021 02:06:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOwmpHGTT3XmdmtJ5s65wi+XQSWHdBDWGLXwonRGGUbP1e6T3Z0ljhk3GD0MrjsXRQ6xaj X-Received: by 2002:aa7:de05:: with SMTP id h5mr27135641edv.174.1629536796379; Sat, 21 Aug 2021 02:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629536796; cv=none; d=google.com; s=arc-20160816; b=zVOSx0vvkuOtep6nrQXe8LKwEAmQ6lVZkSNKc8SXLMT5LSIKXkPmEKN9WaMV/0hzqK NF8rMv2k3eE46oaM9hC6tNbzCBn3dlM5ES2NskYqQwAD7/mK0QwXIn2YK1mgwga10IEV PtOp4VEyA4vnh6AX+5Nl/9Cr5kUTthSMtE2FQFwEaF5wDhk9kcUcL5uXbl1NWhwPJRzR VorFRIYII+fN4vXo5X2/b+Qyswy7L84VUyYSG/ULqtekb4XsqPi5XgkTnCSnIauk30e4 kzlbp/KQw7Xn/MO8vA560XxXrwUyz9srT3vOb8ukKQm6TAvkrSRrOedQzPcG4lETIQgJ zQRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=HhIlFOdmoPtrDHiwNisjRhT3DIcPDA7p2pK+wXQ4c0E=; b=S6WdTTRqOSfQ0D3758UskHKlb3FzS3VQXNespcJbKQWpLYw5silkvvnxkRehwQg/xh temQAazRfF/ZQxeSjpHYMMNwkTd3weCnVjw5XAO/IopikQONwGNk4LWaq9bTIJxxbpu9 QzYkZirl5MnmDfL8P1G6QbFpoUpu8mc1Kltqxbqx5/CQvW7jwjg/GCcErOiq1xxG8qON p+SLB5plReY4ld9Fo4kTKNMdyfl+hO14nXQmN7r84VwOdGSZtu6KZZE9H8jqb9CSPFgq OSdJjkGxBqNmoBOglEiekgApiR5bY85HbNJTxqZPUx2dDUpHVKW0deZEsQh8Ayfbe2zV J/ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hisilicon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lv19si11001498ejb.445.2021.08.21.02.06.09; Sat, 21 Aug 2021 02:06:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233284AbhHUJF1 (ORCPT + 99 others); Sat, 21 Aug 2021 05:05:27 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:14309 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233103AbhHUJF0 (ORCPT ); Sat, 21 Aug 2021 05:05:26 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4GsCHk4hr6z87pp; Sat, 21 Aug 2021 17:04:34 +0800 (CST) Received: from dggema772-chm.china.huawei.com (10.1.198.214) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sat, 21 Aug 2021 17:04:45 +0800 Received: from localhost.localdomain (10.67.165.2) by dggema772-chm.china.huawei.com (10.1.198.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Sat, 21 Aug 2021 17:04:42 +0800 From: Yicong Yang To: , , , , CC: , , , , , <21cnbao@gmail.com> Subject: [PATCH] sched/topology: Remove unused numa_distance in cpu_attach_domain() Date: Sat, 21 Aug 2021 13:41:11 +0800 Message-ID: <20210821054111.63181-1-yangyicong@hisilicon.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggema772-chm.china.huawei.com (10.1.198.214) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org numa_distance in cpu_attach_domain() is introduced in commit b5b217346de8 ("sched/topology: Warn when NUMA diameter > 2") to warn user when NUMA diameter > 2 as we'll misrepresent the scheduler topology structures at that time. This is fixed by Barry in commit 585b6d2723dc ("sched/topology: fix the issue groups don't span domain->span for NUMA diameter > 2") and numa_distance is unused now. So remove it. Signed-off-by: Yicong Yang --- kernel/sched/topology.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index b77ad49dc14f..ccbb141df8c8 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -688,7 +688,6 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) { struct rq *rq = cpu_rq(cpu); struct sched_domain *tmp; - int numa_distance = 0; /* Remove the sched domains which do not contribute to scheduling. */ for (tmp = sd; tmp; ) { @@ -720,9 +719,6 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) sd->child = NULL; } - for (tmp = sd; tmp; tmp = tmp->parent) - numa_distance += !!(tmp->flags & SD_NUMA); - sched_domain_debug(sd, cpu); rq_attach_root(rq, rd); -- 2.17.1