lkml.org 
[lkml]   [2018]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 05/10] sched/fair: Hoist idle_stamp up from idle_balance
From
Date
On 19/11/2018 17:31, Steven Sistare wrote:
[...]
>>> +#define IF_SMP(statement) statement
>>> +
>>
>> I'm not too hot on those IF_SMP() macros. Since you're not introducing
>> any other user for them, what about an inline function for rq->idle_stamp
>> setting ? When it's mapped to an empty statement (!CONFIG_SMP) GCC is
>> smart enough to remove the rq_clock() that would be passed to it on
>> CONFIG_SMP:
>
> That may be true now, but I worry that rq_clock or its subroutines may gain
> side effects in the future that prevent the compiler from removing it. However,
> I could push rq_clock into the inline function:
>
> static inline void rq_idle_stamp_set(rq) { rq->idle_stamp = rq_clock(rq); }
> static inline void rq_idle_stamp_clear(rq) { rq->idle_stamp = 0; }
>
> I like that better, do you?
>

That works for me, though I can't resist nitpicking on
s/rq_idle_stamp_set/rq_idle_stamp_update/

> - Steve

\
 
 \ /
  Last update: 2018-11-20 11:25    [W:0.056 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site