lkml.org 
[lkml]   [2023]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86/resctrl: avoid compiler optimization in __resctrl_sched_in
From


On 3/7/23 15:06, Linus Torvalds wrote:
> On Tue, Mar 7, 2023 at 12:54 PM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> I think the problem is that the <asm/resctrl.h> code is disgusting and
>> horrible in multiple ways:
>>
>> (a) it shouldn't define and declare a static function in a header file
>>
>> (b) the resctrl_sched_in() inline function is misdesigned to begin with
>
> Ok, so here's a *ttoally* untested and mindless patch to maybe fix
> what I dislike about that resctl code.
>
> Does it fix the code generation issue? I have no idea. But this is
> what I would suggest is the right answer, without actually knowing the
> code any better, and just going on a mindless rampage.
>
> It seems to compile for me, fwiw.
>
> Linus

Tested both on GCC and CLANG. Test passes and resctrl limits are working
fine. Thanks for the patch.

Tested-by: Babu Moger <babu.moger@amd.com>

--
Thanks
Babu Moger

\
 
 \ /
  Last update: 2023-03-27 00:50    [W:0.116 / U:1.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site