Re: [PATCH] FS: timerfd: Fix unexpected return value of timerfd_read function.

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

 



hi Tglx,
> But for the above scenario:
>
> ktime_get()
>         do {
>                 seq = read_seqcount_begin(&tk_core.seq);
>                 base = tk->tkr_mono.base;
>                 nsecs = timekeeping_get_ns(&tk->tkr_mono);
>
>         } while (read_seqcount_retry(&tk_core.seq, seq));
>
> So if the interrupt which updates the timekeeper hits in the middle of
> timekeeping_get_ns() then the result is discarded because the sequence
> count changed and read_seqcount_retry() returns true. So it takes another
> round which will be perfectly aligned with the updated time keeper.
>

Do you mean to say the timekeeper  updates always happen from ktime_get?
My point was, when one thread is in ktime_get other thread/isr updates
timekeeper from different flow.

Regards,
Arul



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux