Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3760588pxb; Mon, 1 Feb 2021 04:08:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLEJPQYC+22b5sS0Y12xEA9ozKGYBIfCg6Mcg7GVMkBBN8ZXAd8TW+FXtqh5QEaHFoINDB X-Received: by 2002:a17:907:7252:: with SMTP id ds18mr17599712ejc.239.1612181314279; Mon, 01 Feb 2021 04:08:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612181314; cv=none; d=google.com; s=arc-20160816; b=ZVkGi0iQ4/B3Je25t23oqmUL6Z7q6xY/E9DjDcpqexuI2f+O8XjOi9OgAr3Pzt8MES 4sTZV2TEOy61BAh0C38OnMl2ZpYQKymhPS+Rfsx45fj3U04/Pe83vO/fz+VkJna3pvG/ 8J42mbUAZJMMv+QgCMiBBhUfkIMCGxQ3EpTs2i/x8Bm5vFcGcrOe/7CwQ2pI6WO0sVU5 RommxEWQxHnAOWIgG2G6meeUHEPM/xrwA5viLhXsOUIQIT5XTuxKl4O7HI1OjTVTClxf RGOclt4Qf/OmX5gNpG95iU/EyDTZ+chxb9ZI9QuMAF4rUxMzuFjTJZRqSjPXN8/L3OV9 wMXA== 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=R8mJ/7UcWNh65GnhLNmae+EfaRnXAGKCHFhxU4qfN6c=; b=ZUVxJUA+3/1ZxrT/fbIhJkQAQlyL9EcJ5j3PVcrXisIthQSjP3+s69N/CGOcaX2zGp efdfyoecscmyFTQ5AMguy+YdCmU/KUFhWZtgz46NDUkcN43pCWXWanC0lAPlEkpDresy FnAP85NgmUWPLsllnhL0M0nGcHKj+hWY+6A2yq3iNBLuiQ55Qpt2KkfmaJ9+pTnmtTyG kMDZJiUyWYXQyhOpfix97K6Hr7EBcg+2HpgtiQOnmmGuG3nTKQOV0GA1HLPmWjEFKSzO pIn5g8nu7KkW1Ucv/ioODEPaKuxib3pDUibb1ItkSj4fRLXRzU0sd+8Xx7f7RgDjHL1Z q52g== 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 bi28si10821396edb.493.2021.02.01.04.08.03; Mon, 01 Feb 2021 04:08:34 -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 S229519AbhBAMEi (ORCPT + 99 others); Mon, 1 Feb 2021 07:04:38 -0500 Received: from foss.arm.com ([217.140.110.172]:57876 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbhBAMEh (ORCPT ); Mon, 1 Feb 2021 07:04:37 -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 1377AED1; Mon, 1 Feb 2021 04:03:52 -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 EA9443F718; Mon, 1 Feb 2021 04:03:50 -0800 (PST) From: Valentin Schneider To: "Song Bao Hua \(Barry Song\)" , "linux-kernel\@vger.kernel.org" Cc: "mingo\@kernel.org" , "peterz\@infradead.org" , "vincent.guittot\@linaro.org" , "dietmar.eggemann\@arm.com" , "morten.rasmussen\@arm.com" , "mgorman\@suse.de" Subject: RE: [PATCH 1/1] sched/topology: Make sched_init_numa() use a set for the deduplicating sort In-Reply-To: References: <20210122123943.1217-1-valentin.schneider@arm.com> <20210122123943.1217-2-valentin.schneider@arm.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Mon, 01 Feb 2021 12:03:48 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/01/21 02:02, Song Bao Hua (Barry Song) wrote: >> -----Original Message----- >> From: Valentin Schneider [mailto:valentin.schneider@arm.com] >> That is another thing that's worth considering. Morten was arguing that if >> the distance between two nodes is so tiny, it might not be worth >> representing it at all in the scheduler topology. > > Yes. I agree it is a different thing. Anyway, I saw your patch has been > in sched tree. One side effect your patch is the one more sched_domain > level is imported for this topology: > > 24 > X X XXX X X X X X X XXX > XX XX X XXXXX > XXX X > XX XXX > XX 22 XXX > X XXXXXXX XX > X XXXXX XXXXXXXXX XXXX > XX XXX XX X XX X XX > +--------+ +---------+ +---------+ XX+---------+ > | 0 | 12 | 1 | 20 | 2 | 12 |3 | > | +-----------+ +----------+ +--------+ | > +---X----+ +---------+ +--X------+ +---------+ > X X > XX X > X XX > XX XX > XX X > X XXX XXX > X XXXXXX XX XX X X X XXXX > 22 > Without the patch, Linux will use 10,12,22,24 to build sched_domain; > With your patch, Linux will use 10,12,20,22,24 to build sched_domain. > > So one more layer is added. What I have seen is that: > > For node0 sched_domain <=12 and sched_domain <=20 span the same range > (node0, node1). So one of them is redundant. then in cpu_attach_domain, > the redundant one is dropped due to "remove the sched domains which > do not contribute to scheduling". > > For node1&2, the origin code had no "20", thus built one less sched_domain > level. > Right, that domain degeneration should get you to the same result. We do want to make sure we're handling every distance value in the table; the gist is to "stupidly" build every domain / level we can, and if some are redundant we can remove them after the fact. > What is really interesting is that removing 20 actually gives better > benchmark in speccpu :-) > > >> >> > Thanks >> > Barry > > Thanks > Barry