lkml.org 
[lkml]   [2018]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v7 02/13] arch/x86: Rename the RDT functions and definitions
Date


On 11/12/18 1:46 PM, Borislav Petkov wrote:
> On Mon, Nov 12, 2018 at 07:25:02PM +0000, Moger, Babu wrote:
>>>> @@ -637,10 +637,11 @@ int rdt_get_mon_l3_config(struct rdt_resource *r)
>>>> *
>>>> * For a 35MB LLC and 56 RMIDs, this is ~1.8% of the LLC.
>>>> */
>>>> - intel_cqm_threshold = boot_cpu_data.x86_cache_size * 1024 / r->num_rmid;
>>>> + resctrl_cqm_threshold = boot_cpu_data.x86_cache_size * 1024 /
>>>> + r->num_rmid;
>>>
>>> No need to break that line here.
>>
>> Without the line break, checkpatch complains for "line over 80
>> characters". Do you think we can ignore those?
>
> To quote from the tip handbook which is in preparation right now:
>
> "+The 80 character rule is not a strict rule, so please use common sense when
> +breaking lines."
>
> In this particular case, it is more readable IMO to leave the line unbroken:
>
> resctrl_cqm_threshold = boot_cpu_data.x86_cache_size * 1024 / r->num_rmid;
>
> What is even more readable though is:
>
> unsigned int cl_size = boot_cpu_data.x86_cache_size;
>
> ...
>
> resctrl_cqm_threshold = cl_size * 1024 / r->num_rmid;
>
> and now you have a win-win situation. :)

Yes. Makes sense. Thanks

>
> Thx.
>
\
 
 \ /
  Last update: 2018-11-12 21:52    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog