Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3930851imm; Mon, 8 Oct 2018 11:53:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV63hP1TD8DOKujny8DqIpBGGEPHKkJKHK/W2G9fm4/mIUcWlQx/5G3Kl7iPCN7qnfr11WAEl X-Received: by 2002:a63:9b09:: with SMTP id r9-v6mr22408625pgd.307.1539024788638; Mon, 08 Oct 2018 11:53:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024788; cv=none; d=google.com; s=arc-20160816; b=dn0ww0RkSOiKMzeo51VhoDIy8otsyX+MtwHKUrReCUq/mcRWcHFidXFGhkyf8zH48E nA3ko5i8AcrPx9IegCV0G6S39okFrTRrjMItR6HRfO1Z7LirkXjJ6cwpy7FMLko8Q8XN 5A1FI/jfVOJXy6JZtlM4W6rcVJ8e5CwVPsN6RFcWWZQsgbAkYl5R8S7cCzLZnLulUmPa JVPSv2NLg9BgBggxpplC2S0UwlYfhujQk/DL9TvQ4VylRnat0nGJXYgzo5Dj5r2PRTQI lIis2Rel2jKuK2JiB6qT5lVtuoFeo1VVd+Tjpblq9Z9+9YBhuHI6hY2jyVYhPzxyIfTn 2QIQ== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fXBbA6SZXlyawXktT+gJRt93jZeUJcfCI+SM4dm2tvE=; b=cDnLof1mb1P+7AuZinECkrKD7RCPxylZsGBR+AHXj+bEGnq5OdkigqNiqzm7aKN0xQ amuVIAUMPD4uAU7jvtO6y5xw4LXyn5uwAP6KXdsE3yPY0MU04IDK+yhPit+F6W6S+2t6 2PMxabGSnDtBnnqT6Qt253KHE+MmP4Y6RDbQ3R4MpVvkLve3fABn9K8aSjuJI2KsqDfv UNPyRQ87AuR/P1xjK71eLZAPLnewp3vyi6CaALBAnacMcNNDer31YkjbPqzBcvUdEtQh 1aL7fXgvr5fPcj+GDYDBZ9oSMOI8uWwMx7j2rqGPxQyHHaS4dftTtn96MyKxQZNTdKAa 1zMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uiI6lo7t; 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 f62-v6si20584014pfb.218.2018.10.08.11.52.53; Mon, 08 Oct 2018 11:53:08 -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; dkim=pass header.i=@kernel.org header.s=default header.b=uiI6lo7t; 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 S1732369AbeJICEq (ORCPT + 99 others); Mon, 8 Oct 2018 22:04:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:54704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731723AbeJICEp (ORCPT ); Mon, 8 Oct 2018 22:04:45 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 27FEF2087D; Mon, 8 Oct 2018 18:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024697; bh=jgXt5P9C9XUqVv/rDOmnPkruqRh6JMO08LtAxHJifrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uiI6lo7tHjxqebEftQ8EabRwbe6iy/Yq9HH+PWQq/r0M4ZDZd8IefriyZb34dOyU4 rre/M81NgJivbBbEFv5TCDBzVrRp4TkI3tyGcRMpILpOMoZNC7HXSH9jLCcx9u95Q1 leoTFw5vBDKq94jFRLOEXQSuuv5dxaIC6jL+ON5I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srikar Dronamraju , "Peter Zijlstra (Intel)" , Andre Wild , Heiko Carstens , Linus Torvalds , Mel Gorman , Michael Ellerman , Rik van Riel , Suravee Suthikulpanit , Thomas Gleixner , linuxppc-dev , Ingo Molnar , Sasha Levin Subject: [PATCH 4.18 125/168] sched/topology: Set correct NUMA topology type Date: Mon, 8 Oct 2018 20:31:45 +0200 Message-Id: <20181008175624.800138207@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Srikar Dronamraju [ Upstream commit e5e96fafd9028b1478b165db78c52d981c14f471 ] With the following commit: 051f3ca02e46 ("sched/topology: Introduce NUMA identity node sched domain") the scheduler introduced a new NUMA level. However this leads to the NUMA topology on 2 node systems to not be marked as NUMA_DIRECT anymore. After this commit, it gets reported as NUMA_BACKPLANE, because sched_domains_numa_level is now 2 on 2 node systems. Fix this by allowing setting systems that have up to 2 NUMA levels as NUMA_DIRECT. While here remove code that assumes that level can be 0. Signed-off-by: Srikar Dronamraju Signed-off-by: Peter Zijlstra (Intel) Cc: Andre Wild Cc: Heiko Carstens Cc: Linus Torvalds Cc: Mel Gorman Cc: Michael Ellerman Cc: Peter Zijlstra Cc: Rik van Riel Cc: Suravee Suthikulpanit Cc: Thomas Gleixner Cc: linuxppc-dev Fixes: 051f3ca02e46 "Introduce NUMA identity node sched domain" Link: http://lkml.kernel.org/r/1533920419-17410-1-git-send-email-srikar@linux.vnet.ibm.com Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- kernel/sched/topology.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -1295,7 +1295,7 @@ static void init_numa_topology_type(void n = sched_max_numa_distance; - if (sched_domains_numa_levels <= 1) { + if (sched_domains_numa_levels <= 2) { sched_numa_topology_type = NUMA_DIRECT; return; } @@ -1380,9 +1380,6 @@ void sched_init_numa(void) break; } - if (!level) - return; - /* * 'level' contains the number of unique distances *