Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp494968ybb; Wed, 25 Mar 2020 04:06:53 -0700 (PDT) X-Google-Smtp-Source: ADFU+vssJkR6yBbTP0cblVLAMdqsJ78DMnhPGSO/8L/Ki99UwuOcOUiR55nB8fJyHQUjZeXLvqXe X-Received: by 2002:a05:6830:4038:: with SMTP id i24mr2131231ots.0.1585134412989; Wed, 25 Mar 2020 04:06:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585134412; cv=none; d=google.com; s=arc-20160816; b=EuzstA4AMshlFzQ7cuh6eE3k++NDAJi0l24dcbFbpLxjRvfiPjLZVnsTxi33aznxPG hCeucChQ+hn3pvLIo1HvYALxCc3XGIn1C09uulnXRv/VSVYzLaRh8f8j6+I2St9aOEuo z0ScgNM1iB4a/Omf5T599PDv5e1OQ6Shi+bnK28ZBpJi+6Ch0gCc8VAfEfHdtpTKQ739 HFDuyn6osAbba2S6+Zx+GrExKKf4XX3fYEanLkAJdKAGQ0cJ2kDgjvvli6Pc9YR/fnRG 9y6Gcql4otOuTxAIQnJpcpsChiOUsjUdpX/5ioD0hX0io9E+s++8luvE1nM3Ot65F1Ms Lgsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=RgUMYjYGGt09LReDsdWWpz4Sfmvn7qWOV6WvAu9mzaw=; b=eEVB0R0m4TMzlbYRjMDrhTfxBnxNHQ3JZjC7bXCfMwrdobrIstyU/EJAhNZR430jT9 fx2gaiutkP/OIBOF+OzqfMGCRIcyDcHLxujCSp4HXvWO964OPUQJPhX2r/utEQoZ4Nl8 mwHlboLnPaKu43ztIm/ISJvkMCJAbfiUUIzqw2lE6PGLV+80Wrvt/+xogncBS7riSWqM 6NaYW/Eaexj22KxTtlqm1Kuh9UvfCw/Ya78O0lVse0Hhk3LBycteJiJj/BgBm73z46Ft /jzEAFTsI5IrrReB1pqTLH/HFGqataq/w0BBKhtty/oVi8+RgMiuEydCSVJL0DZlxavc kgfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si5596543oim.76.2020.03.25.04.06.38; Wed, 25 Mar 2020 04:06:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727530AbgCYLF7 (ORCPT + 99 others); Wed, 25 Mar 2020 07:05:59 -0400 Received: from foss.arm.com ([217.140.110.172]:46662 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727380AbgCYLF5 (ORCPT ); Wed, 25 Mar 2020 07:05:57 -0400 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 55A1A31B; Wed, 25 Mar 2020 04:05:57 -0700 (PDT) Received: from [192.168.1.19] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EA1DC3F71F; Wed, 25 Mar 2020 04:05:55 -0700 (PDT) Subject: Re: [PATCH] sched/topology: Fix overlapping sched_group build To: Valentin Schneider , linux-kernel@vger.kernel.org Cc: peterz@infradead.org, mingo@kernel.org, vincent.guittot@linaro.org, morten.rasmussen@arm.com, mgorman@techsingularity.net References: <20200324125533.17447-1-valentin.schneider@arm.com> From: Dietmar Eggemann Message-ID: <4aa814d5-abcd-23b3-323c-5a3503ae3d0a@arm.com> Date: Wed, 25 Mar 2020 12:05:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24.03.20 18:20, Valentin Schneider wrote: > > On Tue, Mar 24 2020, Valentin Schneider wrote: >> Fix >> === >> >> Sanitize the groups we get out of build_group_from_child_sched_domain() >> with the span of the domain we're currently building - this ensures the >> groups we build only contain CPUs that are the right distance away from the >> base CPU. This also requires modifying build_balance_mask(). >> > > I somehow missed that this triggers the WARN_ON_ONCE() in > init_overlap_sched_group(). Gotta figure out why. Cool, seems like qemu can emulate this! qemu-system-aarch64 -kernel Image -hda ./qemu-image-aarch64.img -append 'root=/dev/vda console=ttyAMA0 loglevel=8 sched_debug' -smp cores=8 --nographic -m 512 -cpu cortex-a53 -machine virt -numa node,cpus=0-1,nodeid=0 -numa node,cpus=2-3,nodeid=1, -numa node,cpus=4-5,nodeid=2, -numa node,cpus=6-7,nodeid=3, -numa dist,src=0,dst=1,val=12, -numa dist,src=0,dst=2,val=20, -numa dist,src=0,dst=3,val=22, -numa dist,src=1,dst=2,val=22, -numa dist,src=1,dst=3,val=24, -numa dist,src=2,dst=3,val=12 ... [ 0.711685] [ 0.711767] 10 12 20 22 [ 0.711860] 12 10 22 24 [ 0.711917] 20 22 10 12 [ 0.711970] 22 24 12 10 [ 0.712036] [ 0.718356] CPU0 attaching sched-domain(s): [ 0.718433] domain-0: span=0-1 level=MC [ 0.718646] groups: 0:{ span=0 cap=1006 }, 1:{ span=1 cap=1015 } [ 0.718865] domain-1: span=0-3 level=NUMA [ 0.718906] groups: 0:{ span=0-1 cap=2021 }, 2:{ span=2-3 cap=2014 } [ 0.719044] domain-2: span=0-5 level=NUMA [ 0.719082] groups: 0:{ span=0-3 cap=4035 }, 4:{ span=4-7 cap=3855 } [ 0.719164] ERROR: groups don't span domain->span [ 0.719191] domain-3: span=0-7 level=NUMA [ 0.719228] groups: 0:{ span=0-5 mask=0-1 cap=5974 }, 6:{ span=4-7 mask=6-7 cap=3964 } [ 0.719961] CPU1 attaching sched-domain(s): ... cat /proc/sys/kernel/sched_domain/cpu0/domain*/{name,flags} MC NUMA NUMA NUMA 4655 25647 25647 25647