Messages in this thread | | | From | Linus Torvalds <> | Date | Tue, 7 Mar 2023 13:19:05 -0800 | Subject | Re: [PATCH] x86/resctrl: avoid compiler optimization in __resctrl_sched_in |
| |
On Tue, Mar 7, 2023 at 1:16 PM Nick Desaulniers <ndesaulniers@google.com> wrote: > > > > > Can you expand about part "a" ... Linux has zillions of static inline functions > > in header files to handle CONFIG options. One version is the real McCoy > > while the other is just a stub for the CONFIG=n case. > > Right, I had the same question. > > Perhaps it's more so that no one calls __resctrl_sched_in, only > resctrl_sched_in, therefor they should be folded into one function?
If you think it should be inlined, it should be marked as such.
And if you *don't* think it should be inlined - quite possibly the right answer here - the definition of that function damn well shouldn't be in a header file.
So either way, that __resctrl_sched_in() was wrong, wrong, wrong.
Linus
| |