Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752831AbdHKJPe (ORCPT ); Fri, 11 Aug 2017 05:15:34 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:37674 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751521AbdHKJPc (ORCPT ); Fri, 11 Aug 2017 05:15:32 -0400 Date: Fri, 11 Aug 2017 11:15:27 +0200 From: Peter Zijlstra To: Suravee Suthikulpanit Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, bp@suse.de Subject: Re: [RFC PATCH] sched/topology: Introduce NUMA identity node sched domain Message-ID: <20170811091527.wyngvvq2dy3yzik2@hirez.programming.kicks-ass.net> References: <1502378452-6632-1-git-send-email-suravee.suthikulpanit@amd.com> <20170810164149.2rkkp55km5cxcarg@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1533 Lines: 36 On Fri, Aug 11, 2017 at 12:58:22PM +0700, Suravee Suthikulpanit wrote: > > > On 8/11/17 11:57, Suravee Suthikulpanit wrote: > > > > > > [...] > > > > @@ -1445,9 +1448,24 @@ void sched_init_numa(void) > > > > tl[i] = sched_domain_topology[i]; > > > > > > > > /* > > > > + * Ignore the NUMA identity level if it has the same cpumask > > > > + * as previous level. This is the case for: > > > > + * - System with last-level-cache (MC) sched domain span a NUMA node. > > > > + * - System with DIE sched domain span a NUMA node. > > > > + * > > > > + * Assume all NUMA nodes are identical, so only check node 0. > > > > + */ > > > > + if (!cpumask_equal(sched_domains_numa_masks[0][0], tl[i-1].mask(0))) > > > > + tl[i++] = (struct sched_domain_topology_level){ > > > > + .mask = sd_numa_mask, > > > > + .numa_level = 0, > > > > + SD_INIT_NAME(NODE) > > > > + }; > > > > > > So what you've forgotten to mention is that for those systems where the > > > LLC == NODE this now superfluous level gets removed by the degenerate > > > code. Have you verified that does the right thing? > > > > Let me check with that one and get back. > > Actually, it is not removed by the degenerate code. That is what this logic > is for. It checks for LCC == NODE or DIE == NODE before setting up the NODE > sched level. I can update the comment. This has also been tested on system > w/ LLC == NODE. Why does the degenerate code fail to remove things?