Hi Rik,
On 10/10/2017 10:01 PM, Rik van Riel wrote:
> On Tue, 2017-10-10 at 14:48 +0200, Peter Zijlstra wrote:
>> On Tue, Oct 10, 2017 at 02:42:01PM +0200, Stanislaw Gruszka wrote:
> + u64 steal, steal_time;
> + s64 steal_delta;
> +
> + steal_time =
>
Hi Stanislaw and Peter,
On 10/10/2017 08:42 PM, Stanislaw Gruszka wrote:
> On Tue, Oct 10, 2017 at 12:59:26PM +0200, Ingo Molnar wrote:
>>
>> (Cc:-ed more gents involved in kernel/sched/cputime.c work. Full patch
>> quoted
>> below.)
>>
>> * Dongli Zhang wrote:
>>
>>>
On Tue, 2017-10-10 at 14:48 +0200, Peter Zijlstra wrote:
> On Tue, Oct 10, 2017 at 02:42:01PM +0200, Stanislaw Gruszka wrote:
> > > > + u64 steal, steal_time;
> > > > + s64 steal_delta;
> > > > +
> > > > + steal_time =
> > > >
On Tue, Oct 10, 2017 at 02:42:01PM +0200, Stanislaw Gruszka wrote:
> > > + u64 steal, steal_time;
> > > + s64 steal_delta;
> > > +
> > > + steal_time = paravirt_steal_clock(smp_processor_id());
> > > + steal = steal_delta = steal_time - this_rq()->prev_steal_time;
>
On Tue, Oct 10, 2017 at 12:59:26PM +0200, Ingo Molnar wrote:
>
> (Cc:-ed more gents involved in kernel/sched/cputime.c work. Full patch quoted
> below.)
>
> * Dongli Zhang wrote:
>
> > After guest live migration on xen, steal time in /proc/stat
> >
On Tue, Oct 10, 2017 at 05:14:08PM +0800, Dongli Zhang wrote:
> After guest live migration on xen, steal time in /proc/stat
> (cpustat[CPUTIME_STEAL]) might decrease because steal returned by
> paravirt_steal_clock() might be less than this_rq()->prev_steal_time.
So why not fix
(Cc:-ed more gents involved in kernel/sched/cputime.c work. Full patch quoted
below.)
* Dongli Zhang wrote:
> After guest live migration on xen, steal time in /proc/stat
> (cpustat[CPUTIME_STEAL]) might decrease because steal returned by
> paravirt_steal_clock() might
>>> On 10.10.17 at 11:14, wrote:
> --- a/kernel/sched/cputime.c
> +++ b/kernel/sched/cputime.c
> @@ -238,10 +238,17 @@ static __always_inline u64
> steal_account_process_time(u64 maxtime)
> {
> #ifdef CONFIG_PARAVIRT
> if (static_key_false(_steal_enabled)) {
> -
After guest live migration on xen, steal time in /proc/stat
(cpustat[CPUTIME_STEAL]) might decrease because steal returned by
paravirt_steal_clock() might be less than this_rq()->prev_steal_time.
For instance, steal time of each vcpu is 335 before live migration.
cpu 198 0 368 200064 1962 0 0