From: Ingo Molnar <mingo@kernel.org>
To: "Yu, Fenghua" <fenghua.yu@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
"Anvin, H Peter" <h.peter.anvin@intel.com>,
Ingo Molnar <mingo@elte.hu>, Borislav Petkov <bp@suse.de>,
"Luck, Tony" <tony.luck@intel.com>,
Stephane Eranian <eranian@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Vikas Shivappa <vikas.shivappa@linux.intel.com>,
"Shankar, Ravi V" <ravi.v.shankar@intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>, x86 <x86@kernel.org>
Subject: Re: [PATCH v2 2/3] Documentation, ABI: Add a document entry for cache id
Date: Fri, 8 Jul 2016 20:06:42 +0200 [thread overview]
Message-ID: <20160708180642.GA4429@gmail.com> (raw)
In-Reply-To: <3E5A0FA7E9CA944F9D5414FEC6C712205DFD3208@ORSMSX106.amr.corp.intel.com>
* Yu, Fenghua <fenghua.yu@intel.com> wrote:
> > From: Ingo Molnar [mailto:mingo.kernel.org@gmail.com] On Behalf Of Ingo
> > Molnar
> > Sent: Friday, July 08, 2016 1:42 AM
> > * Fenghua Yu <fenghua.yu@intel.com> wrote:
> >
> > > From: Fenghua Yu <fenghua.yu@intel.com>
> > >
> > > Add an ABI document entry for
> > /sys/devices/system/cpu/cpu*/cache/index*/id.
> > >
> > > Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
> > > ---
> > > Documentation/ABI/testing/sysfs-devices-system-cpu | 13
> > +++++++++++++
> > > 1 file changed, 13 insertions(+)
> > >
> > > diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu
> > b/Documentation/ABI/testing/sysfs-devices-system-cpu
> > > index 1650133..cc62034 100644
> > > --- a/Documentation/ABI/testing/sysfs-devices-system-cpu
> > > +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
> > > @@ -272,6 +272,19 @@ Description: Parameters for the CPU cache
> > attributes
> > > the modified cache line is written to main
> > > memory only when it is replaced
> > >
> > > +
> > > +What: /sys/devices/system/cpu/cpu*/cache/index*/id
> > > +Date: July 2016
> > > +Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
> > > +Description: Cache id
> > > +
> > > + The id identifies a cache in the platform. In same index, the id
> > > + is unique across the platform.
> >
> > What does 'In same index' mean?
>
> It means one cache's id is unique in all caches with same cache index number.
> For example, in all caches with index3 (i.e. level3), cache id 0 is unique to
> identify a L3 cache. But in caches with index 0 (i.e. Level0), there is also a
> cache id 0. So cache id is unique in one index. But not unique in two different
> index.
>
> Does that make sense? I hope I express that correctly.
Yeah, makes sense!
I'd express it like that:
The ID identifies a specific hardware cache of the machine
the kernel is running on. The (depth_index, ID) pair uniquely
identifies a cache.
And wherever you mention 'index' I'd change it over to 'depth index' - because
'index' alone is way too opaque - the 'id' is an index too.
Also note how I avoided the 'platform' word - that is really ambigious as well: it
might mean something generic like 'x86', not just the actual system we are on.
BTW., are there any ID enumeration continuity guarantees, or can there be holes in
the depth index or the ID? (In the normal case, not considering CPU hotplug
creating holes.) Is it the kernel that does the enumeration or do we trust what
the hardware (CPUID) is telling us?
Thanks,
Ingo
next prev parent reply other threads:[~2016-07-08 18:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 22:07 [PATCH v2 0/3] Cache id Fenghua Yu
2016-07-06 22:07 ` [PATCH v2 1/3] cacheinfo: Introduce cache id Fenghua Yu
2016-07-06 22:07 ` [PATCH v2 2/3] Documentation, ABI: Add a document entry for " Fenghua Yu
2016-07-08 8:41 ` Ingo Molnar
2016-07-08 17:06 ` Yu, Fenghua
2016-07-08 17:29 ` Luck, Tony
2016-07-08 18:07 ` Ingo Molnar
2016-07-08 18:41 ` Borislav Petkov
2016-07-08 18:47 ` Luck, Tony
2016-07-08 18:55 ` Borislav Petkov
2016-07-08 19:34 ` Ingo Molnar
2016-07-09 8:17 ` Borislav Petkov
2016-07-08 18:06 ` Ingo Molnar [this message]
2016-07-06 22:07 ` [PATCH v2 3/3] x86, intel_cacheinfo: Enable cache id in x86 Fenghua Yu
2016-07-07 16:21 ` [PATCH v2 0/3] Cache id Borislav Petkov
2016-07-08 3:13 ` Yu, Fenghua
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160708180642.GA4429@gmail.com \
--to=mingo@kernel.org \
--cc=bp@suse.de \
--cc=eranian@google.com \
--cc=fenghua.yu@intel.com \
--cc=h.peter.anvin@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=ravi.v.shankar@intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=vikas.shivappa@linux.intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).