Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1590414 > unrolled thread

Re: [PATCH 5/8] x86/intel_rdt: info file support for MBA prepare

Started byThomas Gleixner <tglx@linutronix.de>
First post2017-03-01 16:40 +0100
Last post2017-03-10 23:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 5/8] x86/intel_rdt: info file support for MBA prepare Thomas Gleixner <tglx@linutronix.de> - 2017-03-01 16:40 +0100
    Re: [PATCH 5/8] x86/intel_rdt: info file support for MBA prepare Shivappa Vikas <vikas.shivappa@linux.intel.com> - 2017-03-10 23:10 +0100

#1590414 — Re: [PATCH 5/8] x86/intel_rdt: info file support for MBA prepare

FromThomas Gleixner <tglx@linutronix.de>
Date2017-03-01 16:40 +0100
SubjectRe: [PATCH 5/8] x86/intel_rdt: info file support for MBA prepare
Message-ID<tgew9-4ZE-17@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1598134

FromShivappa Vikas <vikas.shivappa@linux.intel.com>
Date2017-03-10 23:10 +0100
Message-ID<tjATw-1Jy-5@gated-at.bofh.it>
In reply to#1590414

On Wed, 1 Mar 2017, Thomas Gleixner wrote:

> 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?

Took it as len as the rdtgroup_add_files calls its parameter as len.. Will fix 
to nr_infofiles as that seems better.

>
> 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.

Will fix..

Thanks,
Vikas

>
>> +	r->infofiles_len = ARRAY_SIZE(res_cache_info_files);
>
> Thanks,
>
> 	tglx
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web