Messages in this thread | | | Date | Sun, 03 Jul 2011 16:20:27 +0300 | From | Avi Kivity <> | Subject | Re: [PATCH v4 8/9] KVM-GST: adjust scheduler cpu power |
| |
On 07/02/2011 01:24 PM, Peter Zijlstra wrote: > static void update_rq_clock_task(struct rq *rq, s64 delta) > { > s64 irq_delta = 0, steal = 0; > > rq->clock_task += delta; > > if ((irq_delta + steal)&& sched_feat(NONTASK_POWER)) > sched_rt_avg_update(rq, irq_delta + steal); > } > > And we want it to emit the equivalent of: > > static void update_rq_clock_task(struct rq *rq, s64 delta) > { > rq->clock_task += delta; > } > > Now Glauber is properly paranoid and doesn't trust his compiler (this is > very hot code in the kernel so any extra code emitted here is sad) and > chose the heavy handed CPP solution. > > Now without checking a all relevant gcc versions on all relevant > architectures (see you in a few weeks etc..) can we actually rely on gcc > doing such relatively simple things correct, or should we stick with CPP > just to make sure?
I'm pretty sure any relevant version of gcc will do the right optimizations.
-- error compiling committee.c: too many arguments to function
| |