From patchwork Tue Jun 5 19:08:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 137792 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1326362lji; Tue, 5 Jun 2018 12:08:42 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKrtsuQnDvDJ+KuCAYLDbjVFZZdznpTI5uROjEPyRCaBNsxaI0FCOZCo5MDvQnR0z4E+0+p X-Received: by 2002:a65:5546:: with SMTP id t6-v6mr22023591pgr.363.1528225722375; Tue, 05 Jun 2018 12:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528225722; cv=none; d=google.com; s=arc-20160816; b=K0Fo3pQgbUErgvIAXrrYvca1j+vnLXicXfbKd52fS3Id7mlBPIk8ycVAwapW5wh01Z G/eTBZ5fSgJeaGhgwc6XQrFLx67pcgkG+eMw2IYjTShi6U5NwQoCZPbYn8hwj2pnGBo+ o4/7qMrvuTO2YwzHNdl/cbM43suuJfqaS6z/EB8e+6OneKvIFbTUG7Obl/rRqIAPSl6t J468KISO7TiJHJIjw8ny0aHfayV7FW9kLJUy9Br02+lioLMnzqr+BC/FTuhq9bC+mrrm NAE8UeW93nen+2iP06k2MKJjPqWmC2y0cFzrWqf2z/zjfn/SpsLmB5ktMbjuwvTJvwDb 1wAQ== 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=Xfv5aqTU+kUU16lYVzrc0bRJ4FDjNBZt0RPhyLrtLX0=; b=1InwY4w+9S7i6l+/QwgvZLDIIr58hUOS0Gp12ueAFtz/1AfQfs5ogNkx/ZRlIkwC7e 6XjzciyHICZGtBTJnJuYIHkFsfUmt69nPS2P4XCkJ07A8KJwDiQf5SU997U7VgMdHo1b qiFq7Pn7ruQyzlXN0ZEQvstUCzHvP624M2FnLAxxnYTPNcB+Qq7bNNQ5yLOVIGR8X1dW NpU7VYPw6CEKnwlznCM6ePOfXV4lZPypOYWGo10ntNT6fkDTHel+ylicRXjyBXXoIzis IihWjwfJXfa63b0EFtPwRIny20f/p5DVY+BKzTge0mRIQWuwN7HCNMtwtmvkuEH2qqgq Q+CQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-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 b4-v6si48713352pla.345.2018.06.05.12.08.41; Tue, 05 Jun 2018 12:08:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-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-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752039AbeFETIl (ORCPT + 8 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-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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(-) -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Sudeep Holla 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;