Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-26 Thread Peter Zijlstra
On Tue, 2011-01-25 at 19:27 -0200, Glauber Costa wrote: On Tue, 2011-01-25 at 22:07 +0100, Peter Zijlstra wrote: On Tue, 2011-01-25 at 18:47 -0200, Glauber Costa wrote: On Tue, 2011-01-25 at 21:13 +0100, Peter Zijlstra wrote: On Tue, 2011-01-25 at 18:02 -0200, Glauber Costa wrote:

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-26 Thread Glauber Costa
On Wed, 2011-01-26 at 10:57 +0100, Peter Zijlstra wrote: On Tue, 2011-01-25 at 19:27 -0200, Glauber Costa wrote: On Tue, 2011-01-25 at 22:07 +0100, Peter Zijlstra wrote: On Tue, 2011-01-25 at 18:47 -0200, Glauber Costa wrote: On Tue, 2011-01-25 at 21:13 +0100, Peter Zijlstra wrote:

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-26 Thread Peter Zijlstra
On Wed, 2011-01-26 at 13:43 -0200, Glauber Costa wrote: yes, but once this delta is subtracted from rq-clock_task, this value is not used to dictate power, unless I am mistaken. power is adjusted according to scale_rt_power(), which does it using the values of rq-rt_avg, rq-age_stamp, and

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-26 Thread Peter Zijlstra
On Wed, 2011-01-26 at 17:46 +0100, Peter Zijlstra wrote: it uses a per-cpu virt_steal_time() clock which is expected to return steal-time in ns. This clock should return u64 and wrap on u64 and be provided when CONFIG_SCHED_PARAVIRT. -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-26 Thread Glauber Costa
On Wed, 2011-01-26 at 17:46 +0100, Peter Zijlstra wrote: On Wed, 2011-01-26 at 13:43 -0200, Glauber Costa wrote: yes, but once this delta is subtracted from rq-clock_task, this value is not used to dictate power, unless I am mistaken. power is adjusted according to scale_rt_power(),

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-25 Thread Glauber Costa
On Mon, 2011-01-24 at 20:51 +0100, Peter Zijlstra wrote: On Mon, 2011-01-24 at 16:51 -0200, Glauber Costa wrote: I would really much rather see you change update_rq_clock_task() and subtract your ns resolution steal time from our wall-time, update_rq_clock_task() already updates the

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-25 Thread Peter Zijlstra
On Tue, 2011-01-25 at 18:02 -0200, Glauber Costa wrote: I fail to see how does clock_task influence cpu power. If we also have to touch clock_task for better accounting of other stuff, it is a separate story. But for cpu_power, I really fail. Please enlighten me. static void

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-25 Thread Glauber Costa
On Tue, 2011-01-25 at 21:13 +0100, Peter Zijlstra wrote: On Tue, 2011-01-25 at 18:02 -0200, Glauber Costa wrote: I fail to see how does clock_task influence cpu power. If we also have to touch clock_task for better accounting of other stuff, it is a separate story. But for cpu_power, I

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-25 Thread Peter Zijlstra
On Tue, 2011-01-25 at 18:47 -0200, Glauber Costa wrote: On Tue, 2011-01-25 at 21:13 +0100, Peter Zijlstra wrote: On Tue, 2011-01-25 at 18:02 -0200, Glauber Costa wrote: I fail to see how does clock_task influence cpu power. If we also have to touch clock_task for better accounting of

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-25 Thread Glauber Costa
On Tue, 2011-01-25 at 22:07 +0100, Peter Zijlstra wrote: On Tue, 2011-01-25 at 18:47 -0200, Glauber Costa wrote: On Tue, 2011-01-25 at 21:13 +0100, Peter Zijlstra wrote: On Tue, 2011-01-25 at 18:02 -0200, Glauber Costa wrote: I fail to see how does clock_task influence cpu power.

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-24 Thread Peter Zijlstra
On Mon, 2011-01-24 at 13:06 -0500, Glauber Costa wrote: This is a first proposal for using steal time information to influence the scheduler. There are a lot of optimizations and fine grained adjustments to be done, but it is working reasonably so far for me (mostly) With this patch (and

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-24 Thread Glauber Costa
On Mon, 2011-01-24 at 19:32 +0100, Peter Zijlstra wrote: On Mon, 2011-01-24 at 13:06 -0500, Glauber Costa wrote: This is a first proposal for using steal time information to influence the scheduler. There are a lot of optimizations and fine grained adjustments to be done, but it is working

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-24 Thread Peter Zijlstra
On Mon, 2011-01-24 at 16:51 -0200, Glauber Costa wrote: I would really much rather see you change update_rq_clock_task() and subtract your ns resolution steal time from our wall-time, update_rq_clock_task() already updates the cpu_power relative to the remaining time available. But then

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-24 Thread Peter Zijlstra
On Mon, 2011-01-24 at 16:51 -0200, Glauber Costa wrote: I thought kvm had a ns resolution steal-time clock? Yes, the one I introduced earlier in this series is nsec. However, user and system will be accounted in usec at most, so there is no point in using nsec here. Well, the scheduler

Re: [PATCH 16/16] KVM-GST: adjust scheduler cpu power

2011-01-24 Thread Glauber Costa
On Mon, 2011-01-24 at 20:51 +0100, Peter Zijlstra wrote: On Mon, 2011-01-24 at 16:51 -0200, Glauber Costa wrote: I would really much rather see you change update_rq_clock_task() and subtract your ns resolution steal time from our wall-time, update_rq_clock_task() already updates the