[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161017212207.GC8999@linux.intel.com>
Date: Mon, 17 Oct 2016 14:22:08 -0700
From: Fenghua Yu <fenghua.yu@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Fenghua Yu <fenghua.yu@...el.com>,
"H. Peter Anvin" <h.peter.anvin@...el.com>,
Ingo Molnar <mingo@...e.hu>, Tony Luck <tony.luck@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Stephane Eranian <eranian@...gle.com>,
Borislav Petkov <bp@...e.de>,
Dave Hansen <dave.hansen@...el.com>,
Nilay Vaish <nilayvaish@...il.com>, Shaohua Li <shli@...com>,
David Carrillo-Cisneros <davidcc@...gle.com>,
Ravi V Shankar <ravi.v.shankar@...el.com>,
Sai Prakhya <sai.praneeth.prakhya@...el.com>,
Vikas Shivappa <vikas.shivappa@...ux.intel.com>,
linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>
Subject: Re: [PATCH v4 08/18] x86/intel_rdt: Pick up L3/L2 RDT parameters
from CPUID
On Mon, Oct 17, 2016 at 07:02:19PM +0200, Thomas Gleixner wrote:
> On Mon, 17 Oct 2016, Fenghua Yu wrote:
> > On Mon, Oct 17, 2016 at 03:45:32PM +0200, Thomas Gleixner wrote:
> > > I wonder whether this is the proper abstraction level. We might as well do
> > > the following:
> > >
> > > rdtresources[] = {
> > > {
> > > .name = "L3",
> > > },
> > > {
> > > .name = "L3Data",
> > > },
> > > {
> > > .name = "L3Code",
> > > },
> > >
> > > and enable either L3 or L3Data+L3Code. Not sure if that makes things
> > > simpler, but it's definitely worth a thought or two.
> >
> > This way will be better than having cdp_enabled/capable for L3 and not
> > for L2.
>
> So you need to change the struct to have capable and enabled
>
> > > static void rdt_get_config(int idx, struct rdt_resource *r)
> > > {
> > > union cpuid_0x10_1_eax eax;
> > > union cpuid_0x10_1_edx edx;
> > > u32 ebx, ecx;
> > >
> > > cpuid_count(0x00000010, idx, &eax.full, &ebx, &ecx, &edx.full);
> > > r->max_closid = edx.split.cos_max + 1;
> > > r->num_closid = r->max_closid;
> > > r->cbm_len = eax.split.cbm_len + 1;
> > > r->max_cbm = BIT_MASK(eax.split.cbm_len + 1) - 1;
> > > r->enabled = true;
>
> And set
>
> r->capable = true;
>
> here instead of r->enabled and set r->enabled at mount time for the
> resources depending on the mount flags.
Neat code change!
Thanks,
-Fenghua
Powered by blists - more mailing lists