Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4557673yba; Mon, 29 Apr 2019 23:52:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzN1YVn4leYMdgg1LShg3zZE3MQBujRTQmZTD9LUv5e6f9PyeuxXDmuvGynp5AwDEVfrTk7 X-Received: by 2002:a17:902:b589:: with SMTP id a9mr43351275pls.66.1556607159048; Mon, 29 Apr 2019 23:52:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556607159; cv=none; d=google.com; s=arc-20160816; b=hCRmdZzZdLVfG8XrGvZiJbdzT4ulAQLWZThJBWup2HygD/GAPeyuoY7HS+OydY3bYX VGcqa/BOJCaPHgF0tiLnegnPRqc77f4Ic/upTeGWUGOa6HHtyRJ5EvH+AEwWW2A2/Q2J Vocsu4oJccHMDD6Ub4GNKBlxub9ni0wVbEDDIgKTCiRmjt4SABNwFr3dhzz+DetCFgL6 tQFetw9wt94Anf7BAddGuIJOEkElgvO4jhLc46Sd0Cek2OZpGisy0ejM5aKsDXCvHd20 aKVJRIm7IKWHWKbm95TI2QFPdQPCSZhSFk7InCOhMH2+JlAAP6/7ogU+XXMOA1wP/2zh hZWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=qN3VerpaqOdIGuUXTR5dt2XO1wBt2HwygQaOykPSnWA=; b=s+mqRs5VywPyHaRL5rfQdRoNOW7aXITk7zCmoE274AlCr8HZ0K/i0IFe03nrVkLpIU +yMzCJUuIhRlopDU+URSo8OTzzf4YITfVH1bN+mAjBaOgvb3s8xVydZTus2CBMYzvzDA ltvHmairhs+H929UHPZNFFX8xTWooOrffoX6D//7IdDyQHA8AYvVYBRccwwgFaJqPddS SL/l+G+lDhO+XUKTli4ltqHYcF9Ze5DS1PXU2toXpsY306Buc3aqXOg7CacMq7Xnwoo7 Fq3N1zEKlWkcEPt6c96FFsJTXdvNNN4p+kT0idpmosBIcdjainkHKDiOMka3DnxdEDgs 18mA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23si142380pgi.145.2019.04.29.23.52.23; Mon, 29 Apr 2019 23:52:39 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726145AbfD3GvL (ORCPT + 99 others); Tue, 30 Apr 2019 02:51:11 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:40089 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725938AbfD3GvL (ORCPT ); Tue, 30 Apr 2019 02:51:11 -0400 Received: by mail-ed1-f68.google.com with SMTP id e56so4984441ede.7 for ; Mon, 29 Apr 2019 23:51:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qN3VerpaqOdIGuUXTR5dt2XO1wBt2HwygQaOykPSnWA=; b=L/j0tH7Zm//Y2Tetki2qKe9GcQNMINWkRSyftcITh17V6x3ZewHGo1jNj0TckUlBKs 8iFfx53bB9ZqwH9Z4Gd8B5y1mjDR6YXRWYbylY3yKM7mc56O1F6dk7t0QQeKrw5Nhey+ 9nFvpmqxBXICG3wzCy9aidYtMUxH2YDnkI8NDWAQSjc3VSQDru+2CmTUg4ax41ch0+Xi zeckrKTXEfoOI0RqNR4GHuZlyd7K8vMpDtQR+Y7NV94Iv9T/96VmrHYd6I3TF5oiuUhJ VXQkzJsx0ty7nnmQDASOpIKcNh29uaCnLXipWjOCGmwUOfoC8ECOqkoOLpDkwKPpjLfb BYSQ== X-Gm-Message-State: APjAAAWnaDnytUXdbc5uxBAsRcDp1kbAbNyO2lW7vxuzI2tK6y96DKFj 9xgJsV7iogy9hGaGwzMbGCJu5SrzoQXrt2wfCA0= X-Received: by 2002:a50:b513:: with SMTP id y19mr19629692edd.100.1556607069701; Mon, 29 Apr 2019 23:51:09 -0700 (PDT) MIME-Version: 1.0 References: <20190226062012.23746-1-lenb@kernel.org> <20190226190512.GR2861@worktop.programming.kicks-ass.net> In-Reply-To: <20190226190512.GR2861@worktop.programming.kicks-ass.net> From: Len Brown Date: Tue, 30 Apr 2019 02:50:58 -0400 Message-ID: Subject: Re: [PATCH 0/14] v2 multi-die/package topology support To: Peter Zijlstra Cc: X86 ML , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 26, 2019 at 2:05 PM Peter Zijlstra wrote: > > On Tue, Feb 26, 2019 at 01:19:58AM -0500, Len Brown wrote: > > Documentation/cputopology.txt | 72 ++++++++++++++--------- > > Documentation/x86/topology.txt | 6 +- > > arch/x86/include/asm/processor.h | 5 +- > > arch/x86/include/asm/smp.h | 1 + > > arch/x86/include/asm/topology.h | 5 ++ > > arch/x86/kernel/cpu/topology.c | 85 +++++++++++++++++++++------- > > arch/x86/kernel/smpboot.c | 73 +++++++++++++++++++++++- > > arch/x86/xen/smp_pv.c | 1 + > > drivers/base/topology.c | 22 +++++++ > > drivers/hwmon/coretemp.c | 9 +-- > > drivers/powercap/intel_rapl.c | 75 +++++++++++++----------- > > drivers/thermal/intel/x86_pkg_temp_thermal.c | 9 +-- > > include/linux/topology.h | 6 ++ > > 13 files changed, 276 insertions(+), 93 deletions(-) > > Should we not also have changes to > arch/x86/kernel/cpu/proc.c:show_cpuinfo_cores() ? Good question. I was thinking that /proc/cpuinfo was sort of the legacy API, and adding a field might break something. While adding an attribute to sysfs topology directory was the compatible/safe way to make additions. /proc/cpuinfo has these fields today: physical id : 0 this is the physical package id siblings : 8 this is the count of cpus in the same package core id : 3 this is cpu_core_id cpu cores : 4 this is booted_cores If one were to make a change here, I'd consider adding the (physical) die_id, though it is already in sysfs topology as an attribute. Not sure if it would then make sense to print the count of cpus in the die. Not sure what I'd name it, and this info is already in sysfs as a map and list. Len Brown, Intel Open Source Technology Center