Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp43312imp; Wed, 20 Feb 2019 13:53:43 -0800 (PST) X-Google-Smtp-Source: AHgI3IbUQgTGfcNpbNq10KAL41bLJr6hwLc13Wj6INwGzaQ3OLtg6/fIC4LKctEGDXEKfk1OWNH6 X-Received: by 2002:a63:4509:: with SMTP id s9mr30132445pga.420.1550699623788; Wed, 20 Feb 2019 13:53:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550699623; cv=none; d=google.com; s=arc-20160816; b=h4DgbBNdrd568OzV/3Lngm2yCudoiyWTtYBmdAI/+6IPhFPZMrPN4hRERbtyQnPfnW McsGeDvi367cxS/TDYsPvEueIzJsZticfkdrQTnjnJo++ghTo3oXrw7C6QK/axaVJSS0 /VA3AdMnSFAyYv2T3ggayCkyjuuFBeTSv5+6ROY/xgUUpEC9wC083Bbf2jTMLnyATiEC fLRcFaOHchWNcxcHjkDe6M9rsSjUX/63Ex7ylacicbpmb1XPRRkEpLq0QUhQF9f4ByXg RB5j+MN29C8Es8t9bIpUWUy/LpUNC41gM1QO+nHK3eeEldrsfNrKKru6W5WAnsTWYKpz LsXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=N2ulBtZpeoYZiijAsjFUtTcuT89e899DdK9nYQmoRv0=; b=OFnoTulhUILcFVoSSO4LWs6GYLBsWpppiS8CEf7N7CI4hwpe9lDRw1xIipKmFbaOR4 XLwNhuOimaUVytdfEklnbdZ103SFv4FJH0FZnqa1FfzWqHsldquEfjH8unVYSfd0ZitB Jj0/lKdQmm4LhaTaON5LVA7a7oal6FqkW8OiNVtLNt4AYDP/v3PuFE63g5K4EmTol6O5 yxfUyS+T7mJxODL11uZHmc8j6pP2dJx3uBWl3FaOfmTZAEMOnba1nJHxNgZkVxVwFit7 Wbe1EzCOspLe9BrT0AXPnYokXl/6QXA61EMkNKW+5Z1EpwQBdb9AWFjar6QFyppUUBFR dHUQ== 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 cc9si1114715plb.59.2019.02.20.13.53.27; Wed, 20 Feb 2019 13:53:43 -0800 (PST) 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 S1726535AbfBTVxH (ORCPT + 99 others); Wed, 20 Feb 2019 16:53:07 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:47250 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725869AbfBTVxH (ORCPT ); Wed, 20 Feb 2019 16:53:07 -0500 X-IronPort-AV: E=Sophos;i="5.58,392,1544482800"; d="scan'208";a="370232574" Received: from 91-160-5-165.subs.proxad.net (HELO [192.168.44.23]) ([91.160.5.165]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA; 20 Feb 2019 22:52:40 +0100 Subject: Re: [PATCH 05/11] x86 topology: export die_siblings To: Len Brown , x86@kernel.org Cc: linux-kernel@vger.kernel.org, Len Brown , linux-doc@vger.kernel.org References: <635b2bf8b1151a191cd9299276b75791a818c0c2.1550545163.git.len.brown@intel.com> <0d54a56186fb9be7a8f622a4625a41dc600dd7a4.1550545163.git.len.brown@intel.com> From: Brice Goglin Openpgp: preference=signencrypt Autocrypt: addr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acUI6H0c8onWoH9LuW99WznEtFgPJg++TAv f9M2x57Gzl+/nYTB5/Kpl1qdPPC91zUipiKbnF5f8bQpol0WC+ovmQARAQABiQIfBBgBAgAJ BQJTYPdaAhsMAAoJEESRkPMjWr074+0P/iEcN27dx3oBTzoeGEBhZUVQRZ7w4A61H/vW8oO8 IPkZv9kFr5pCfIonmHEbBlg6yfjeHXwF5SF2ywWRKkRsFHpaFWywxqk9HWXu8cGR1pFsrwC3 EdossuVbEFNmhjHvcAo11nJ7JFzPTEnlPjE6OY9tEDwl+kp1WvyXqNk9bosaX8ivikhmhB47 7BA3Kv8uUE7UL6p7CBdqumaOFISi1we5PYE4P/6YcyhQ9Z2wH6ad2PpwAFNBwxSu+xCrVmaD skAwknf6UVPN3bt67sFAaVgotepx6SPhBuH4OSOxVHMDDLMu7W7pJjnSKzMcAyXmdjON05Sz SaILwfceByvHAnvcFh2pXK9U4E/SyWZDJEcGRRt79akzZxls52stJK/2Tsr0vKtZVAwogiaK uSp+m6BRQcVVhTo/Kq3E0tSnsTHFeIO6QFHKJCJv4FRE3Dmtz15lueihUBowsq9Hk+u3UiLo SmrMAZ6KgA4SQxB2p8/M53kNJl92HHc9nc//aCQDi1R71NyhtSx+6PyivoBkuaKYs+S4pHmt sFE+5+pkUNROtm4ExLen4N4OL6Kq85mWGf2f6hd+OWtn8we1mADjDtdnDHuv+3E3cacFJPP/ wFV94ZhqvW4QcyBWcRNFA5roa7vcnu/MsCcBoheR0UdYsOnJoEpSZswvC/BGqJTkA2sf Message-ID: Date: Wed, 20 Feb 2019 22:52:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <0d54a56186fb9be7a8f622a4625a41dc600dd7a4.1550545163.git.len.brown@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 19/02/2019 à 04:40, Len Brown a écrit : > From: Len Brown > > like core_siblings, except it shows which die are in the same package. > > This is needed for lscpu(1) to correctly display die topology. > > Signed-off-by: Len Brown > Cc: linux-doc@vger.kernel.org > Signed-off-by: Len Brown > --- > Documentation/cputopology.txt | 10 ++++++++++ > arch/x86/include/asm/smp.h | 1 + > arch/x86/include/asm/topology.h | 1 + > arch/x86/kernel/smpboot.c | 20 ++++++++++++++++++++ > arch/x86/xen/smp_pv.c | 1 + > drivers/base/topology.c | 6 ++++++ > include/linux/topology.h | 3 +++ > 7 files changed, 42 insertions(+) > > diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt > index 287213b4517b..7dd2ae3df233 100644 > --- a/Documentation/cputopology.txt > +++ b/Documentation/cputopology.txt > @@ -56,6 +56,16 @@ core_siblings_list: > human-readable list of cpuX's hardware threads within the same > die_id. > > +die_siblings: > + > + internal kernel map of cpuX's hardware threads within the same > + physical_package_id. > + > +die_siblings_list: > + > + human-readable list of cpuX's hardware threads within the same > + physical_package_id. > + Hello Len, Patches #4 and #5 are changing the meaning the core_siblings (in the past, it always returned all threads in the entire package). All existing user-space tools will see each die as a separate package until they are updated to read die_siblings too. It only matters for multi-die CPUs when running a recent kernel with an old userspace tool, but it may still be consider as a sysfs ABI change. Worse, things will break again if you ever add tile_siblings for CPUID.1f "Tiles". User-space will suddenly see 2 dies of 2 cores instead 1 die of 2 tiles of 2 cores. I understand that this isn't easy to fix. But I want to make sure people are aware of the meaning of this change. The proper way to avoid this is to stop having file foo_siblings refer to "the container of foo" instead of "foo itself" (because that container changes when you add intermediate levels). Rename sysfs files like below, and you don't get any breakage anymore when adding intermediate levels: thread_siblings -> core_threads (can we do sysfs alias or symlink to keep the old name?) core_siblings -> die_threads die_siblings -> package_threads (needs an alias too) The documentation would also be much easier to read since "die_threads" is obviously "human-readable list of cpuX's hardware threads within the same die_id". And no need to modify the doc anymore when adding levels :) Brice