Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1296972imm; Tue, 5 Jun 2018 12:09:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL5/JZpE+rLmCVrmO8GU2LtuSfxchjuEAvTa1bL0sUchzG34BQyksdzvFdVt/fBeImKEDro X-Received: by 2002:a65:4a10:: with SMTP id s16-v6mr2015375pgq.57.1528225787146; Tue, 05 Jun 2018 12:09:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528225787; cv=none; d=google.com; s=arc-20160816; b=kle+Q5xblW3Ghoe4vKEAGQUh5duGcoRKXTaoHSdjCQ1K5hPestz5xl5i/Se48r92K4 2MqWIzSNxqYoduh2pjhRYT0J4lLc9bRBhqDvLCXT68j9iuJgHECRmXoV82xT0GeVl3Qk nx+FXICm513f80+bFfL0eYVoA9zxKFC0K5LKEDVPE0zd9R3gxvmszMIScRsLFAfx7gHq hKcjSq1IzyQi5gbWqJbdrIZaKkBq0SP4/TczoakKQrroev5Og0PA9JLheAjDxWPcvbjQ FjkJ0ijCa2YwS5xHK7qHYjQHd7Ql0sWunGfY+mNcGZ3qKRJyTEtc4RQlUKcoMnOG75j7 0vsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=6rHGlF2Pwivl569MhAb1opWRmwaFd2xYxX+1MTO0cS0=; b=OTR1ubGna2aF8mb9LUJQwPiluLHEI5AI9tZPXz/9ZjaSiV9gVNVAFBKfvQnMHHSmC6 j/kNR3T/i/Jo0QncZR/s/O5iDn3jEiSHGvXNOlMts6P6gW8a04e7Q5D6C3CJbD56U3AJ E/OzMgd4af5QMTEdgysePnjyD27c7fVDcjOQFD5NTSARyHTLWTj/LAQZFxKSEfvpX74L eLw62wilvn+7HpBGuBj1gFvQtwIHysfk2DDwYYkSfjdooi6M7rbrwntcT/9xJshnQ1JP yP8Hs3WXf7z8asmP814m19GV0dWNSXc4g8VQ6o3OqRvQMzBhAS0z5n5bJcpJlIvOc24p lPcQ== 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 r39-v6si50741697pld.249.2018.06.05.12.09.32; Tue, 05 Jun 2018 12:09:47 -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 S1752382AbeFETIl (ORCPT + 99 others); Tue, 5 Jun 2018 15:08:41 -0400 Received: from foss.arm.com ([217.140.101.70]:60452 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752035AbeFETIk (ORCPT ); Tue, 5 Jun 2018 15:08:40 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 464511435; Tue, 5 Jun 2018 12:08:40 -0700 (PDT) Received: from beelzebub.austin.arm.com (beelzebub.austin.arm.com [10.118.12.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B7EE43F25D; Tue, 5 Jun 2018 12:08:39 -0700 (PDT) From: Jeremy Linton To: Sudeep.Holla@arm.com Cc: Will.Deacon@arm.com, Catalin.Marinas@arm.com, Robin.Murphy@arm.com, Morten.Rasmussen@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, geert@linux-m68k.org, linux-acpi@vger.kernel.org, ard.biesheuvel@linaro.org, Jeremy Linton Subject: [PATCH] arm64: topology: Avoid checking numa mask for scheduler MC selection Date: Tue, 5 Jun 2018 14:08:37 -0500 Message-Id: <20180605190837.493505-1-jeremy.linton@arm.com> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The numa mask subset check has problems if !CONFIG_NUMA, over hotplug operations or during early boot. Lets disable the NUMA siblings checks for the time being, as NUMA in socket machines have LLC's that will assure that the scheduler topology isn't "borken". Futher, as a defensive mechanism during hotplug, lets assure that the LLC siblings are also masked. Signed-off-by: Jeremy Linton --- arch/arm64/kernel/topology.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index 7415c166281f..f845a8617812 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c @@ -215,13 +215,8 @@ EXPORT_SYMBOL_GPL(cpu_topology); const struct cpumask *cpu_coregroup_mask(int cpu) { - const cpumask_t *core_mask = cpumask_of_node(cpu_to_node(cpu)); + const cpumask_t *core_mask = &cpu_topology[cpu].core_sibling; - /* Find the smaller of NUMA, core or LLC siblings */ - if (cpumask_subset(&cpu_topology[cpu].core_sibling, core_mask)) { - /* not numa in package, lets use the package siblings */ - core_mask = &cpu_topology[cpu].core_sibling; - } if (cpu_topology[cpu].llc_id != -1) { if (cpumask_subset(&cpu_topology[cpu].llc_siblings, core_mask)) core_mask = &cpu_topology[cpu].llc_siblings; @@ -239,8 +234,10 @@ static void update_siblings_masks(unsigned int cpuid) for_each_possible_cpu(cpu) { cpu_topo = &cpu_topology[cpu]; - if (cpuid_topo->llc_id == cpu_topo->llc_id) + if (cpuid_topo->llc_id == cpu_topo->llc_id) { cpumask_set_cpu(cpu, &cpuid_topo->llc_siblings); + cpumask_set_cpu(cpuid, &cpu_topo->llc_siblings); + } if (cpuid_topo->package_id != cpu_topo->package_id) continue; -- 2.14.3