Thread (32 messages) 32 messages, 4 authors, 2018-11-21

RE: [PATCH v8 06/13] arch/resctrl: Initialize the resource functions that are different

From: "Moger, Babu" <Babu.Moger@amd.com>
Date: 2018-11-21 16:47:37
Also in: lkml

-----Original Message-----
From: Borislav Petkov <bp@alien8.de>
Sent: Tuesday, November 20, 2018 6:05 AM
To: Moger, Babu <Babu.Moger@amd.com>
Cc: tglx@linutronix.de; mingo@redhat.com; corbet@lwn.net;
fenghua.yu@intel.com; reinette.chatre@intel.com; peterz@infradead.org;
gregkh@linuxfoundation.org; davem@davemloft.net; akpm@linux-
foundation.org; hpa@zytor.com; x86@kernel.org;
mchehab+samsung@kernel.org; arnd@arndb.de;
kstewart@linuxfoundation.org; pombredanne@nexb.com;
rafael@kernel.org; kirill.shutemov@linux.intel.com; tony.luck@intel.com;
qianyue.zj@alibaba-inc.com; xiaochen.shen@intel.com;
pbonzini@redhat.com; Singh, Brijesh [off-list ref]; Hurwitz,
Sherry [off-list ref]; dwmw2@infradead.org; Lendacky,
Thomas [off-list ref]; luto@kernel.org; joro@8bytes.org;
jannh@google.com; vkuznets@redhat.com; rian@alum.mit.edu;
jpoimboe@redhat.com; linux-kernel@vger.kernel.org; linux-
doc@vger.kernel.org
Subject: Re: [PATCH v8 06/13] arch/resctrl: Initialize the resource functions
that are different

On Tue, Nov 20, 2018 at 10:59:18AM +0100, Borislav Petkov wrote:
quoted
So I'm wondering: instead of having mba_wrmsr_intel() and
mba_wrmsr_amd() and adding those per-vendor initialization functions,
why don't you push down the vendor differentiation into mba_wrmsr()?

Then in that function you do

	if (vendor == X86_VENDOR_INTEL)
		__mba_wrmsr_intel();
	else if (vendor == X86_VENDOR_AMD)
		__mba_wrmsr_amd();

and so on and then you don't have to do any of that initialization dance
here and the struct rdt_resource assignment for the MBA will remain
nicely similar to the other ones...

Hmmm?
Yeah, after having look at the patchset further, that might not be a
good idea as you need to assign more per-vendor stuff than just an MSR
accessor function...
Ok. No changes here. Thanks
--
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help