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

From: Borislav Petkov
Date: Tue Nov 20 2018 - 07:05:33 EST


On Tue, Nov 20, 2018 at 10:59:18AM +0100, Borislav Petkov wrote:
> 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...

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.