lkml.org 
[lkml]   [2020]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] sched/rt: cpupri_find: implement fallback mechanism for !fit case
On Tue, 18 Feb 2020 17:27:46 +0000
Qais Yousef <qais.yousef@arm.com> wrote:

> > If we are going to use static branches, then lets just remove the
> > parameter totally. That is, make two functions (with helpers), where
> > one needs this fitness function the other does not.
> >
> > if (static_branch_unlikely(&sched_asym_cpu_capacity))
> > ret = cpupri_find_fitness(...);
> > else
> > ret = cpupri_find(...);
> >
> > if (!ret)
> > return -1;
> >
> > Something like that?
>
> Is there any implication on code generation here?
>
> I like my flavour better tbh. But I don't mind refactoring the function out if
> it does make it more readable.

I just figured we remove the passing of the parameter (which does make
an impact on the code generation).

Also, perhaps it would be better to not have to pass functions to the
cpupri_find(). Is there any other function that needs to be past, or
just this one in this series?

-- Steve

\
 
 \ /
  Last update: 2020-02-18 19:04    [W:0.096 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site