Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756215AbcK2HD3 (ORCPT ); Tue, 29 Nov 2016 02:03:29 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:34027 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756158AbcK2HDS (ORCPT ); Tue, 29 Nov 2016 02:03:18 -0500 X-IronPort-AV: E=Sophos;i="5.31,715,1473112800"; d="scan'208";a="247148395" To: Borislav Petkov , LKML From: Brice Goglin Subject: AMD Bulldozer topology regression since 4.6 Message-ID: <583D2833.4030508@inria.fr> Date: Tue, 29 Nov 2016 08:03:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1039 Lines: 57 Hello Since Linux 4.6 (and still in 4.9-rc5 at least), both AMD Bulldozer cores of a single dual-core compute unit report the same core_id: $ cat /sys/devices/system/cpu/cpu{?,??}/topology/core_id 0 0 1 1 2 2 3 0 3 [...] Before 4.5 (and for a very long time), the kernel reported different core_ids: 0 1 2 3 4 5 6 7 0 [...] This causes user-space tools (at least all that rely on hwloc for topology discovery) to think the processor has dual-threaded cores instead of dual-core compute-unit modules. The cause is likely this patch, which seems to assume both cores of a same compute-unit have the same ID, which is wrong? commit 8196dab4fc159943df6baaac04973bb1accb7100 Author: Borislav Petkov Date: Fri Mar 25 15:52:36 2016 +0100 x86/cpu: Get rid of compute_unit_id It is cpu_core_id anyway. Signed-off-by: Borislav Petkov Link: http://lkml.kernel.org/r/1458917557-8757-3-git-send-email-bp@alien8.de Signed-off-by: Thomas Gleixner Thanks Brice