On Mon, 2011-01-31 at 12:25 +0100, Peter Zijlstra wrote:
On Fri, 2011-01-28 at 14:52 -0500, Glauber Costa wrote:
+#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING
+static DEFINE_PER_CPU(u64, cpu_steal_time);
+
+#ifndef CONFIG_64BIT
+static DEFINE_PER_CPU(seqcount_t, steal_time_seq);
+
On Tue, 2011-02-01 at 13:59 -0200, Glauber Costa wrote:
Because that part is kvm-specific, and this is scheduler general.
It seemed cleaner to me to do it this way. But I can do it differently,
certainly.
Well, any steal time clock will be hypervisor specific, but if we agree
that anything
On Tue, 2011-02-01 at 17:19 +0100, Peter Zijlstra wrote:
On Tue, 2011-02-01 at 13:59 -0200, Glauber Costa wrote:
Because that part is kvm-specific, and this is scheduler general.
It seemed cleaner to me to do it this way. But I can do it differently,
certainly.
Well, any steal time
On Tue, 2011-02-01 at 14:22 -0200, Glauber Costa wrote:
Which tick accounting? In your other e-mail , you pointed that this only
runs in touch_steal_time, which is fine, will change.
That tick ;-), all the account_foo muck is per tick.
But all the rest
here, that is behind the
On Tue, 2011-02-01 at 19:59 +0100, Peter Zijlstra wrote:
On Tue, 2011-02-01 at 14:22 -0200, Glauber Costa wrote:
Which tick accounting? In your other e-mail , you pointed that this only
runs in touch_steal_time, which is fine, will change.
That tick ;-), all the account_foo muck is
On Tue, 2011-02-01 at 17:55 -0200, Glauber Costa wrote:
update_rq_clock_task still have to keep track of what was the last steal
time value we saw, in the same way it does for irq.
Right, the CONFIG_SCHED_PARAVIRT patch I sent earlier adds a
prev_steal_time member to struct rq for this
On Fri, 2011-01-28 at 14:52 -0500, Glauber Costa wrote:
+#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING
+static DEFINE_PER_CPU(u64, cpu_steal_time);
+
+#ifndef CONFIG_64BIT
+static DEFINE_PER_CPU(seqcount_t, steal_time_seq);
+
+static inline void steal_time_write_begin(void)
+{
+
On Mon, 2011-01-31 at 12:25 +0100, Peter Zijlstra wrote:
On Fri, 2011-01-28 at 14:52 -0500, Glauber Costa wrote:
+#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING
+static DEFINE_PER_CPU(u64, cpu_steal_time);
+
+#ifndef CONFIG_64BIT
+static DEFINE_PER_CPU(seqcount_t, steal_time_seq);
+
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 some host pinnings to demonstrate the situation),
two vcpus with