[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1703011625080.4005@nanos>
Date: Wed, 1 Mar 2017 16:34:14 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Vikas Shivappa <vikas.shivappa@...ux.intel.com>
cc: vikas.shivappa@...el.com, linux-kernel@...r.kernel.org,
x86@...nel.org, hpa@...or.com, mingo@...nel.org,
peterz@...radead.org, ravi.v.shankar@...el.com,
tony.luck@...el.com, fenghua.yu@...el.com, andi.kleen@...el.com
Subject: Re: [PATCH 5/8] x86/intel_rdt: info file support for MBA prepare
On Fri, 17 Feb 2017, Vikas Shivappa wrote:
> As a preparatory patch to MBA info file setup, generalize the info file
> setup to have the option to choose between different set of files.
> Although multiple cache resources have same info files, Memory resources
> have different set of info files. That way we have the option to choose
> between memory resource and cache resource info files.
Sigh.
> @@ -77,6 +77,8 @@ struct rftype {
> * @default_ctrl: Specifies default cache cbm or mem b/w percent.
> * @min_cbm_bits: Minimum number of consecutive bits to be set
> * in a cache bit mask
> + * @info_files: resctrl info files for the resource
> + * @infofiles_len: Number of info files
len == length, nr == number. No? Too intuitive, right?
And no, not infofiles_nr. It wants to be nr_infofiles. And while at it
please either use infofiles or info_files, but not a mixture of
both. Random underscores are not enhancing readability at all.
> +void rdt_get_cache_infofile(struct rdt_resource *r)
> +{
> + r->info_files = &res_cache_info_files[0];
What's wrong with
r->info_files = res_cache_info_files;
Nothing, but it would be too easy to read. This is not the obfuscated
c-code contest.
> + r->infofiles_len = ARRAY_SIZE(res_cache_info_files);
Thanks,
tglx
Powered by blists - more mailing lists