Re: [patch 1/2] Ignore stolen time in the softlockup watchdog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Dumazet wrote:
> Jeremy Fitzhardinge a écrit :
>
>> +static DEFINE_PER_CPU(unsigned long long, touch_timestamp);
>
> ...
>
>>  void touch_softlockup_watchdog(void)
>>  {
>> -    __raw_get_cpu_var(touch_timestamp) = jiffies;
>> +    __raw_get_cpu_var(touch_timestamp) = sched_clock();
>>  }
>
> Not very clear if this is safe on 32bit, since this is not anymore
> atomic.

Hm, good point.  Don't think it matters very much.  These values are
per-cpu, and if an interrupt happens between the word updates and the
intermediate values causes a timeout, then it was pretty marginal
anyway.  I guess the worst case is if the low-word gets written first,
and it goes from a high value to low, then it could be sampled as if
time had gone back by up to ~4 seconds.

I'll give it another look.

    J
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux