Re: [PATCH v5 13/18] x86/intel_rdt: Add mkdir to resctrl file system
From: Thomas Gleixner
Date: Fri Oct 28 2016 - 14:46:59 EST
On Fri, 28 Oct 2016, Fenghua Yu wrote:
> On Wed, Oct 26, 2016 at 05:01:32PM +0200, Thomas Gleixner wrote:
> > Handles all cases without 'CDP is special' and whatever nonsense intel will
> > come up with in future. All you need to do is to add that force_min_closid
> > field into the resource struct and set it for l3data and l3code.
> >
> > relaxed_max_closid is set at mount time by an appropriate mount option.
>
> Can we just do a simple implementation that finds the minimal closid? We
> can implement the maximum closid and mount parameter later?
Sure. I'm a great fan of: Keep It Simple
> AFAIK, the minimal closid works in all current situations (L3, L3DATA,
> L3CODE, and L2) and there is no platform that needs to use max closid yet.
Good.
> This is the updated patch that only change is to use minimal closid in
> closid_init(). Does it look good?
>
> +static void closid_init(void)
> +{
> + struct rdt_resource *r;
> + int rdt_min_closid;
> +
> + /* Compute rdt_min_closid across all resources */
> + rdt_min_closid = 0;
> + for_each_enabled_rdt_resource(r)
> + rdt_min_closid = min(rdt_min_closid, r->num_closid);
The result will be 0 :) You want to init rdt_min_closid to 32 or INT_MAX;
Other than that it's perfect !
Thanks,
tglx