Re: [PATCH 8/8] cputime: Safely read cputime of full dynticks CPUs

From: Frederic Weisbecker
Date: Wed Jan 30 2013 - 19:38:18 EST


2013/1/28 Sedat Dilek <sedat.dilek@xxxxxxxxx>:
> On Mon, Jan 28, 2013 at 8:04 PM, Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:
>> While remotely reading the cputime of a task running in a
>> full dynticks CPU, the values stored in utime/stime fields
>> of struct task_struct may be stale. Its values may be those
>> of the last kernel <-> user transition time snapshot and
>> we need to add the tickless time spent since this snapshot.
>>
>> To fix this, flush the cputime of the dynticks CPUs on
>> kernel <-> user transition and record the time / context
>> where we did this. Then on top of this snapshot and the current
>> time, perform the fixup on the reader side from task_times()
>> accessors.
>>
>> Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
>> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
>> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
>> Cc: Li Zhong <zhong@xxxxxxxxxxxxxxxxxx>
>> Cc: Namhyung Kim <namhyung.kim@xxxxxxx>
>> Cc: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
>> Cc: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
>> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
>> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
>> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>> [fixed kvm module related build errors]
>> Signed-off-by: Sedat Dilek <sedat.dilek@xxxxxxxxx>
>>
>
> Can you explain a bit what is the difference between "3.8-rc4-nohz3"
> and "full-dynticks-cputime-for-mingo" patchsets?

3.8-rc4-nohz3 is the latest experimental tree that implements full
dynticks. It includes an earlier version of full dynticks cputime and
many other things to make the full dynticks possible: nohz printk,
many tweaks on the scheduler and timers...etc

>
> Does the latter need no more EXPORT_SYMBOL_GPL for vtime_guest_enter()
> and vtime_guest_exit() when CONFIG_KVM=m (see [1])?

It doesn't need export symbol on vtime_guest_() APIs, only on
guest_enter and guest_exit.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/