Re: [PATCH 2/2] time: Complete NTP adjustment threshold judging conditions

2014-10-23 Thread John Stultz
On Thu, Oct 9, 2014 at 12:04 AM, pang.xunlei  wrote:
> The clocksource mult-adjustment threshold is [mult-maxadj, mult+maxadj],
> timekeeping_adjust() only deals with the upper threshold, but misses the
> lower threshold.
>
> This patch adds the lower threshold judging condition.
>
> Signed-off-by: pang.xunlei 

Added to my 3.19 queue.

thanks!
-john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 2/2] time: Complete NTP adjustment threshold judging conditions

2014-10-23 Thread John Stultz
On Thu, Oct 9, 2014 at 12:04 AM, pang.xunlei pang.xun...@linaro.org wrote:
 The clocksource mult-adjustment threshold is [mult-maxadj, mult+maxadj],
 timekeeping_adjust() only deals with the upper threshold, but misses the
 lower threshold.

 This patch adds the lower threshold judging condition.

 Signed-off-by: pang.xunlei pang.xun...@linaro.org

Added to my 3.19 queue.

thanks!
-john
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] time: Complete NTP adjustment threshold judging conditions

2014-10-09 Thread pang.xunlei
The clocksource mult-adjustment threshold is [mult-maxadj, mult+maxadj],
timekeeping_adjust() only deals with the upper threshold, but misses the
lower threshold.

This patch adds the lower threshold judging condition.

Signed-off-by: pang.xunlei 
---
 kernel/time/timekeeping.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index cad61b3..469cdbf 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1403,7 +1403,7 @@ static void timekeeping_adjust(struct timekeeper *tk, s64 
offset)
}
 
if (unlikely(tk->tkr.clock->maxadj &&
-   (tk->tkr.mult > tk->tkr.clock->mult + tk->tkr.clock->maxadj))) {
+   (abs(tk->tkr.mult - tk->tkr.clock->mult) > 
tk->tkr.clock->maxadj))) {
printk_once(KERN_WARNING
"Adjusting %s more than 11%% (%ld vs %ld)\n",
tk->tkr.clock->name, (long)tk->tkr.mult,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 2/2] time: Complete NTP adjustment threshold judging conditions

2014-10-09 Thread pang.xunlei
The clocksource mult-adjustment threshold is [mult-maxadj, mult+maxadj],
timekeeping_adjust() only deals with the upper threshold, but misses the
lower threshold.

This patch adds the lower threshold judging condition.

Signed-off-by: pang.xunlei pang.xun...@linaro.org
---
 kernel/time/timekeeping.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index cad61b3..469cdbf 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1403,7 +1403,7 @@ static void timekeeping_adjust(struct timekeeper *tk, s64 
offset)
}
 
if (unlikely(tk-tkr.clock-maxadj 
-   (tk-tkr.mult  tk-tkr.clock-mult + tk-tkr.clock-maxadj))) {
+   (abs(tk-tkr.mult - tk-tkr.clock-mult)  
tk-tkr.clock-maxadj))) {
printk_once(KERN_WARNING
Adjusting %s more than 11%% (%ld vs %ld)\n,
tk-tkr.clock-name, (long)tk-tkr.mult,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/