Re: [PATCH 1/2] timekeeping: Avoid taking lock in NMI path with CONFIG_DEBUG_TIMEKEEPING

2016-10-04 Thread John Stultz
On Tue, Oct 4, 2016 at 5:30 PM, Alexei Starovoitov wrote: > On Tue, Aug 23, 2016 at 04:08:21PM -0700, John Stultz wrote: >> When I added some extra sanity checking in timekeeping_get_ns() under >> CONFIG_DEBUG_TIMEKEEPING, I missed that the NMI safe __ktime_get_fast_ns() >> method was using timeke

Re: [PATCH 1/2] timekeeping: Avoid taking lock in NMI path with CONFIG_DEBUG_TIMEKEEPING

2016-10-04 Thread Alexei Starovoitov
On Tue, Aug 23, 2016 at 04:08:21PM -0700, John Stultz wrote: > When I added some extra sanity checking in timekeeping_get_ns() under > CONFIG_DEBUG_TIMEKEEPING, I missed that the NMI safe __ktime_get_fast_ns() > method was using timekeeping_get_ns(). > > Thus the locking added to the debug checks

[PATCH 1/2] timekeeping: Avoid taking lock in NMI path with CONFIG_DEBUG_TIMEKEEPING

2016-08-23 Thread John Stultz
When I added some extra sanity checking in timekeeping_get_ns() under CONFIG_DEBUG_TIMEKEEPING, I missed that the NMI safe __ktime_get_fast_ns() method was using timekeeping_get_ns(). Thus the locking added to the debug checks broke the NMI-safety of __ktime_get_fast_ns(). This patch open-codes t