lkml.org 
[lkml]   [2015]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [RFC][PATCH 3/4] ntp: Use printk_deferred in leapsecond path
    From
    On Tue, Jun 2, 2015 at 3:31 AM, Jiri Bohac <jbohac@suse.cz> wrote:
    > Hi,
    >
    > On Fri, May 29, 2015 at 01:24:27PM -0700, John Stultz wrote:
    >> Looking over the leapsecond code, I noticed the printk messages
    >> reporting the leapsecond insertion in the second_overflow path
    >> were not using the printk_deferred method. This was surprising
    >> since the printk_deferred method was added in part to avoid
    >> printk-ing while holding the timekeeping locks.
    >>
    >> See 6d9bcb621b0b (timekeeping: use printk_deferred when holding
    >> timekeeping seqlock) for further rational.
    >>
    >> I can only guess that this omission was a git add -p oversight.
    >
    > second_overflow() is called from accumulate_nsecs_to_secs().
    >
    > accumulate_nsecs_to_secs() is called from update_wall_time()
    > - once directly
    > - once via logarithmic_accumulation()
    > Both calls are before write_seqcount_begin(&tk_core.seq).
    >
    > So it looks safe to use printk there.

    Good point. The update is being done to the shadow-timekeeper, so we
    won't block readers. This can probably be dropped then. Although I'm
    almost consider keeping it for consistency so I don't forget this
    again and worry about it in the future.

    thanks
    -john


    \
     
     \ /
      Last update: 2015-06-02 18:41    [W:3.179 / U:0.164 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site