lkml.org 
[lkml]   [2018]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] kernel/sched/core.c: Avoid unused variable on non-SMP configs
On Mon, 10 Sep 2018 at 12:32, Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> Hi Vincent,
>
> On Mon, Sep 10, 2018 at 9:00 AM, Vincent Guittot
> <vincent.guittot@linaro.org> wrote:
> > On Sun, 9 Sep 2018 at 19:00, Miguel Ojeda
> > <miguel.ojeda.sandonis@gmail.com> wrote:
> >>
> >> On Sun, Sep 9, 2018 at 6:45 PM, Borislav Petkov <bp@alien8.de> wrote:
> >> > On Sun, Sep 09, 2018 at 06:36:01PM +0200, Miguel Ojeda wrote:
> >> >> No, you get a different warning depending on whether you have enabled
> >> >> CONFIG_PARAVIRT_TIME_ACCOUNTING or CONFIG_IRQ_TIME_ACCOUNTING.
> >> >
> >> > Ok.
> >> >
> >> > Still, adding __maybe_unused to both (or writing it before the name,
> >> > whatever works!) and dropping the ifdeffery is still better for
> >> > readability's sake than having more ifdeffery, IMO.
> >>
> >> Agreed, it is quite confusing already. I tried to keep the style of
> >> the code, but Ingo/Peter might prefer the cleanup. Let's see...
> >
> > FYI, another patch has already been sent for this warning
> > https://lkml.org/lkml/2018/8/10/22
>
> Indeed -- sorry, I didn't notice. The patches are different in
> behavior, though; is the block there supposed to be there in non-SMP
> cases? (I guess so, since originally it was there, but asking just in
> case).

Yes, i think it's worth keeping it for !SMP
That being said, the original goal of the code is to compute the
amount of capacity stolen to a guest or by interrupt in order to
reflect that int the CPU capacity. But on !SMP, the cpu_capacity is
not used as there is no load balance decision between CPU to do.
Now, the code has being recently updated and the irq time is now also
used in schedutil when selecting frequency which can also benefit to
!SMP
But the enable of irq tracking for !SMP hasn't been sent yet

Regards,
Vincent

>
> Cheers,
> Miguel

\
 
 \ /
  Last update: 2018-09-10 14:35    [W:0.434 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site