lkml.org 
[lkml]   [2021]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v6 02/12] x86/paravirt: switch time pvops functions to use static_call()
    On Tue, Mar 09, 2021 at 02:48:03PM +0100, Juergen Gross wrote:
    > @@ -167,6 +168,17 @@ static u64 native_steal_clock(int cpu)
    > return 0;
    > }
    >
    > +DEFINE_STATIC_CALL(pv_steal_clock, native_steal_clock);
    > +DEFINE_STATIC_CALL(pv_sched_clock, native_sched_clock);
    > +
    > +bool paravirt_using_native_sched_clock = true;
    > +
    > +void paravirt_set_sched_clock(u64 (*func)(void))
    > +{
    > + static_call_update(pv_sched_clock, func);
    > + paravirt_using_native_sched_clock = (func == native_sched_clock);
    > +}

    What's the point of this function if there's a global
    paravirt_using_native_sched_clock variable now?

    Looking how the bit of information whether native_sched_clock is used,
    is needed in tsc.c, it probably would be cleaner if you add a

    set_sched_clock_native(void);

    or so, to tsc.c instead and call that here and make that long var name a
    a shorter and static one in tsc.c instead.

    Hmm?

    --
    Regards/Gruss,
    Boris.

    https://people.kernel.org/tglx/notes-about-netiquette

    \
     
     \ /
      Last update: 2021-03-09 19:59    [W:3.349 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site