Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932677AbbFBQEp (ORCPT ); Tue, 2 Jun 2015 12:04:45 -0400 Received: from mail-ig0-f173.google.com ([209.85.213.173]:35822 "EHLO mail-ig0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932517AbbFBQEh (ORCPT ); Tue, 2 Jun 2015 12:04:37 -0400 MIME-Version: 1.0 In-Reply-To: <20150602103144.GB18714@midget.suse.cz> References: <1432931068-4980-1-git-send-email-john.stultz@linaro.org> <1432931068-4980-4-git-send-email-john.stultz@linaro.org> <20150602103144.GB18714@midget.suse.cz> Date: Tue, 2 Jun 2015 09:04:36 -0700 Message-ID: Subject: Re: [RFC][PATCH 3/4] ntp: Use printk_deferred in leapsecond path From: John Stultz To: Jiri Bohac Cc: lkml , Prarit Bhargava , Daniel Bristot de Oliveira , Richard Cochran , Jan Kara , Thomas Gleixner , Ingo Molnar , Shuah Khan Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1432 Lines: 36 On Tue, Jun 2, 2015 at 3:31 AM, Jiri Bohac 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/