Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp959292pxb; Fri, 22 Jan 2021 03:46:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwb6MR2MuJdL7KHAG/mvemReFEQAevyBZOBqpWVOvKa3QouVU4Ry+kI4+CdDgyyUbDaZH4q X-Received: by 2002:aa7:c78c:: with SMTP id n12mr2878034eds.363.1611315971389; Fri, 22 Jan 2021 03:46:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611315971; cv=none; d=google.com; s=arc-20160816; b=iCO4/moVZ6tA+Zj4J+XhaDyWV7oiFNmTyauLxFpj5aEHJiiClkADkwH7ewIR+56LGV M2CJU0PgFH5X7xxXzocHsPymsFTYODxCYwJQao/Ty8b6XtBHSAMnbBoOGp0dsp0MTctO D+qE7QxMpN9Q3Fwq6fH2EFJIHtrf8laGlFa0825ek6qX2717R+ReFlQJ0+zsh2lhxXLk s0Oh8Idn786OE9FUWyQ/pannuWttEQZ3apCdeMRpoFxFjnl/ejFY7/DeXZymP2ts9a4g mo/Up7j9mGpMOzfpJf1k2XAFxZrRXPncRjwdk3DqzB2y6m/x4CurLL1oGYIEWej+QDf2 MmXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from; bh=mKtNnky3RTAUKXZ9nu4tRTmJJVtKxDXKc2TcEaD6ZP8=; b=L8Ibc4iJypqI9oOCL+8xlHZcMr6jFXpVnY24uGgcN7IJV0SyI4AXlHqe2G7RqZUviB 2awhxQmDis+mhZAQow+ZyOv3lUdSEYBomWlOijpq0fR1Fc4I3bdVJAjprcPUfuZO93G1 dun26tVduhmSpeGEmS5XTRpWA4zVbCNOTUeR0EzwNk7BC3V3viECNUfWNBb1OhHv5oOS cYb+3aXcmaYo9TIsgF1CVmRSnBjLtBuJ9++5gC6RJKqC9vgx8SN2L2YIxzKRvPxXMd0g QU3yOvcWcYl4QcdyTxTF6Z8+SOjWsJYwea7o/Acsv1eiEIibcu9xDF8KduE4wodNUYG9 I9vA== 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=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q15si3602484edr.397.2021.01.22.03.45.47; Fri, 22 Jan 2021 03:46:11 -0800 (PST) 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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727990AbhAVLoA (ORCPT + 99 others); Fri, 22 Jan 2021 06:44:00 -0500 Received: from foss.arm.com ([217.140.110.172]:42094 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727396AbhAVLRx (ORCPT ); Fri, 22 Jan 2021 06:17:53 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CC74611D4; Fri, 22 Jan 2021 03:17:06 -0800 (PST) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 958533F719; Fri, 22 Jan 2021 03:17:05 -0800 (PST) From: Valentin Schneider To: "Song Bao Hua \(Barry Song\)" , Dietmar Eggemann , Meelis Roos , LKML Cc: Peter Zijlstra , Vincent Guittot , Mel Gorman Subject: RE: 5.11-rc4+git: Shortest NUMA path spans too many nodes In-Reply-To: <9d6c6d3ba6ac4272bf844034da4653fe@hisilicon.com> References: <3ec17983-7959-eccd-af25-400056a5877d@linux.ee> <8797fd78-4367-bc5c-3a35-43c544c745e4@linux.ee> <353d255769b6463c862993e2329a9a8d@hisilicon.com> <99ecee86-8d96-c1e2-5b38-8f3dfcc38bd1@arm.com> <9d6c6d3ba6ac4272bf844034da4653fe@hisilicon.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Fri, 22 Jan 2021 11:16:28 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/01/21 11:09, Song Bao Hua (Barry Song) wrote: >> -----Original Message----- >> From: Dietmar Eggemann [mailto:dietmar.eggemann@arm.com] >> > For example, every cpu with the below numa_distance can have >> > "groups don't span domain->span": >> > node 0 1 2 3 >> > 0: 10 12 20 22 >> > 1: 12 10 22 24 >> > 2: 20 22 10 12 >> > 3: 22 24 12 10 >> 2 20 2 >> So this should look like: 1 --- 0 ---- 2 --- 3 > > Yes. So here we are facing another problem: > kernel/sched/topology.c has an assumption that: > node_distance(0,j) includes all distances in > node_distance(i,j). > > void sched_init_numa(void) > { > ... > * > * Assumes node_distance(0,j) includes all distances in > * node_distance(i,j) in order to avoid cubic time. > */ > next_distance = curr_distance; > for (i = 0; i < nr_node_ids; i++) { > for (j = 0; j < nr_node_ids; j++) { > for (k = 0; k < nr_node_ids; k++) > } > > but obviously we are not this case. Right now, we are getting > some performance decrease due to this, probably I'll start another > thread for it. > It's not too difficult to solve that one; I must still have a patch laying somewhere using a bitmap - this relies on the ACPI spec stating distance values are 8bit, which gives us a reasonable bound for the bitmap size. Let me fish this out. > Thanks > Barry