Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp322663pxb; Wed, 15 Sep 2021 02:58:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3WN8NOIkBiDeXAaoW6cr/LsFF8ikw18TXFLsNHSjh1wSDNx7EwzU54bcHqB836N/HHTRY X-Received: by 2002:a05:6512:3192:: with SMTP id i18mr16195809lfe.209.1631699888703; Wed, 15 Sep 2021 02:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631699888; cv=none; d=google.com; s=arc-20160816; b=CrJMFQyuHSBDwbV/Xf6NrRMzrBegExAruGjJ+Qumui2A1xUtpKjScpVuxvvGd+bj5x eNaOBlk2y+VhGbJRMmWNBZwzmvbjSdYp9Au5IUKBN4ZS9FAUIRTjVni/kh9bp4FSS1po GRJgoSnIutI94y9qFGjV1pEibEL2YThHpmHXnH/UzaPBlLy7/nHo6myP46QEcKxHbMVE FH0mrfHAFTFya6Sye5ns4P9mOvuHnJB4+gCerwmniwgx+y3cu3KBif79raYpLz1cyetJ KWKfxoVCjKtBfKkp2T/70VslwZW9+x0BxuwVbFWMcFHN7zO+f7Yk2ZpFwHawF6cXUcn2 XJLQ== 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=tOKbwzQXpUGpBaQiPOvcsM/I136IGKtPQVCSeIkXou0=; b=WpwSDIq6/xbQq8iNd0ac3PeOHXMsVtEM2O+WW3OWaKlYcD0EG0BZX/3fcoUKQsKE7y kKmfFgHaANI8rO7+UbE+f2VtAQX5whAXBZTHMJx6UzD1e/Y3NZSg4TcXOFKB3Z4tQCja jX3jvMwiAOoClVyqG4IGmAgRz8neLyJ1IOhB2zBOP5jIxzJiIvW/hoPmaWBDTm7O9aC+ CgmkbMzos1Eph2tbkURRzB55dDxi9rqIA6fF6EwU3A8sGEppOMLuj9unpOrvZNB/UMaJ ofhLiDPYHFOvnmyI25Nsw5upaalXSDIFIbFY70hJaFeG8hmMtzaZpS7voxagTSDa5ptM MQhg== 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 s14si5859370ljj.189.2021.09.15.02.57.25; Wed, 15 Sep 2021 02:58:08 -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 S237249AbhIOJ5L (ORCPT + 99 others); Wed, 15 Sep 2021 05:57:11 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:9050 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237143AbhIOJ5K (ORCPT ); Wed, 15 Sep 2021 05:57:10 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4H8bDB0HK8zVmg7; Wed, 15 Sep 2021 17:54:50 +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.2308.8; Wed, 15 Sep 2021 17:55:50 +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.2308.8; Wed, 15 Sep 2021 17:55:50 +0800 From: Yicong Yang To: , , , , , <21cnbao@gmail.com> CC: , , , Subject: [RESEND PATCH] sched/topology: Remove unused numa_distance in cpu_attach_domain() Date: Wed, 15 Sep 2021 14:31:58 +0800 Message-ID: <20210915063158.80639-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: dggems701-chm.china.huawei.com (10.3.19.178) 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 4e8698e62f07..690bd1ab86f3 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.33.0