Re: [PATCH v2 1/2] sched/rt: Check to push the task when changing its affinity

2015-02-08 Thread Xunlei Pang
Hi Steve, On 7 February 2015 at 05:09, Steven Rostedt rost...@goodmis.org wrote: On Thu, 5 Feb 2015 23:59:33 +0800 + + if (task_running(rq, p) + cpumask_test_cpu(task_cpu(p), new_mask) Why the check for task_cpu being in new_mask? If the current cpu of this

[PATCH v2 2/2] sched/rt: Add check_preempt_equal_prio() logic in pick_next_task_rt()

2015-02-05 Thread Xunlei Pang
From: Xunlei Pang check_preempt_curr() doesn't call sched_class::check_preempt_curr when the class of current is a higher level. So if there is a DL task running when doing this for RT, check_preempt_equal_prio() will definitely miss, which may result in some response latency for this RT task

[PATCH v2 1/2] sched/rt: Check to push the task when changing its affinity

2015-02-05 Thread Xunlei Pang
From: Xunlei Pang We may suffer from extra rt overload rq due to the affinity, so when the affinity of any runnable rt task is changed, we should check to trigger balancing, otherwise it will cause some unnecessary delayed real-time response. Unfortunately, current RT global scheduler doesn't

[PATCH v2 1/2] sched/rt: Check to push the task when changing its affinity

2015-02-05 Thread Xunlei Pang
From: Xunlei Pang pang.xun...@linaro.org We may suffer from extra rt overload rq due to the affinity, so when the affinity of any runnable rt task is changed, we should check to trigger balancing, otherwise it will cause some unnecessary delayed real-time response. Unfortunately, current RT

[PATCH v2 2/2] sched/rt: Add check_preempt_equal_prio() logic in pick_next_task_rt()

2015-02-05 Thread Xunlei Pang
From: Xunlei Pang pang.xun...@linaro.org check_preempt_curr() doesn't call sched_class::check_preempt_curr when the class of current is a higher level. So if there is a DL task running when doing this for RT, check_preempt_equal_prio() will definitely miss, which may result in some response

[tip:sched/core] sched/deadline: Remove cpu_active_mask from cpudl_find()

2015-02-04 Thread tip-bot for Xunlei Pang
Commit-ID: 9659e128f7025b6545934d644d19e9c6e603 Gitweb: http://git.kernel.org/tip/9659e128f7025b6545934d644d19e9c6e603 Author: Xunlei Pang AuthorDate: Mon, 19 Jan 2015 04:49:37 + Committer: Ingo Molnar CommitDate: Wed, 4 Feb 2015 07:52:29 +0100 sched/deadline: Remove

Re: [PATCH v3 1/2] time: Don't bother to run rtc_resume() for the nonstop clocksource

2015-02-04 Thread Xunlei Pang
Ping ... On 29 January 2015 at 23:59, Xunlei Pang wrote: > From: Xunlei Pang > > If a system does not provide a persistent_clock(), the time > will be updated on resume by rtc_resume(). With the addition > of the non-stop clocksources for suspend timing, those systems > set

Re: [PATCH] sched/deadline: Add update_rq_clock() in yield_task_dl()

2015-02-04 Thread Xunlei Pang
On 4 February 2015 at 21:28, Xunlei Pang wrote: > Hi Kirill, > > I've also sent out this similar patch to yours before, > and I agree with you on this point :-) > > But with the latest modification which peter made, > ( see: cebde6d681aa45f96111cfcffc1544cf2a0454ff ) M

Re: [PATCH] sched/deadline: Add update_rq_clock() in yield_task_dl()

2015-02-04 Thread Xunlei Pang
014 at 00:31, Xunlei Pang wrote: > yield_task_dl() calls update_curr_dl() which calls start_dl_timer() > to throttle current task. But yield_task_dl() doesn't update the rq > clock which will cause start_dl_timer() to set the wrong dl_timer > which may be much later than

Re: [PATCH 5/5] sched/rt: Optimize find_lowest_rq() to select a cache hot cpu

2015-02-04 Thread Xunlei Pang
Hi Peter, Steve, Thanks for all your valuable sharing. I'll keep them in mind. Regards, Xunlei On 30 January 2015 at 03:23, Peter Zijlstra wrote: > On Fri, Jan 30, 2015 at 12:42:47AM +0800, Xunlei Pang wrote: >> On 27 January 2015 at 22:56, Steven Rostedt wrote: >> > On Tue,

Re: [PATCH RESEND 2/2] sched/rt: Add check_preempt_equal_prio() logic in pick_next_task_rt()

2015-02-04 Thread Xunlei Pang
Hi Steve, On 4 February 2015 at 11:17, Steven Rostedt wrote: > On Wed, 4 Feb 2015 09:12:21 +0800 > Xunlei Pang wrote: > >> From: Xunlei Pang >> >> check_preempt_curr() doesn't call sched_class::check_preempt_curr >> when the class of current is a higher l

Re: [PATCH RESEND 1/2] sched/rt: Check to push the task when changing its affinity

2015-02-04 Thread Xunlei Pang
Hi Steve, On 4 February 2015 at 11:14, Steven Rostedt wrote: > On Wed, 4 Feb 2015 09:12:20 +0800 > Xunlei Pang wrote: > >> From: Xunlei Pang >> >> + */ >> + cpumask_copy(>cpus_allowed, new_mask); >> +

[tip:sched/core] sched/deadline: Remove cpu_active_mask from cpudl_find()

2015-02-04 Thread tip-bot for Xunlei Pang
Commit-ID: 9659e128f7025b6545934d644d19e9c6e603 Gitweb: http://git.kernel.org/tip/9659e128f7025b6545934d644d19e9c6e603 Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Mon, 19 Jan 2015 04:49:37 + Committer: Ingo Molnar mi...@kernel.org CommitDate: Wed, 4 Feb 2015 07:52

Re: [PATCH RESEND 1/2] sched/rt: Check to push the task when changing its affinity

2015-02-04 Thread Xunlei Pang
Hi Steve, On 4 February 2015 at 11:14, Steven Rostedt rost...@goodmis.org wrote: On Wed, 4 Feb 2015 09:12:20 +0800 Xunlei Pang xlp...@126.com wrote: From: Xunlei Pang pang.xun...@linaro.org + */ + cpumask_copy(p-cpus_allowed, new_mask); + p

Re: [PATCH RESEND 2/2] sched/rt: Add check_preempt_equal_prio() logic in pick_next_task_rt()

2015-02-04 Thread Xunlei Pang
Hi Steve, On 4 February 2015 at 11:17, Steven Rostedt rost...@goodmis.org wrote: On Wed, 4 Feb 2015 09:12:21 +0800 Xunlei Pang xlp...@126.com wrote: From: Xunlei Pang pang.xun...@linaro.org check_preempt_curr() doesn't call sched_class::check_preempt_curr when the class of current

Re: [PATCH] sched/deadline: Add update_rq_clock() in yield_task_dl()

2015-02-04 Thread Xunlei Pang
On 4 February 2015 at 21:28, Xunlei Pang pang.xun...@linaro.org wrote: Hi Kirill, I've also sent out this similar patch to yours before, and I agree with you on this point :-) But with the latest modification which peter made, ( see: cebde6d681aa45f96111cfcffc1544cf2a0454ff ) My mistake

Re: [PATCH v3 1/2] time: Don't bother to run rtc_resume() for the nonstop clocksource

2015-02-04 Thread Xunlei Pang
Ping ... On 29 January 2015 at 23:59, Xunlei Pang xlp...@126.com wrote: From: Xunlei Pang pang.xun...@linaro.org If a system does not provide a persistent_clock(), the time will be updated on resume by rtc_resume(). With the addition of the non-stop clocksources for suspend timing, those

Re: [PATCH 5/5] sched/rt: Optimize find_lowest_rq() to select a cache hot cpu

2015-02-04 Thread Xunlei Pang
Hi Peter, Steve, Thanks for all your valuable sharing. I'll keep them in mind. Regards, Xunlei On 30 January 2015 at 03:23, Peter Zijlstra pet...@infradead.org wrote: On Fri, Jan 30, 2015 at 12:42:47AM +0800, Xunlei Pang wrote: On 27 January 2015 at 22:56, Steven Rostedt rost...@goodmis.org

Re: [PATCH] sched/deadline: Add update_rq_clock() in yield_task_dl()

2015-02-04 Thread Xunlei Pang
, Xunlei Pang pang.xun...@linaro.org wrote: yield_task_dl() calls update_curr_dl() which calls start_dl_timer() to throttle current task. But yield_task_dl() doesn't update the rq clock which will cause start_dl_timer() to set the wrong dl_timer which may be much later than current deadline time

[PATCH RESEND 1/2] sched/rt: Check to push the task when changing its affinity

2015-02-03 Thread Xunlei Pang
From: Xunlei Pang We may suffer from extra rt overload rq due to the affinity, so when the affinity of any runnable rt task is changed, we should check to trigger balancing, otherwise it will cause some unnecessary delayed real-time response. Unfortunately, current RT global scheduler doesn't

[PATCH RESEND 2/2] sched/rt: Add check_preempt_equal_prio() logic in pick_next_task_rt()

2015-02-03 Thread Xunlei Pang
From: Xunlei Pang check_preempt_curr() doesn't call sched_class::check_preempt_curr when the class of current is a higher level. So if there is a DL task running when doing this for RT, check_preempt_equal_prio() will definitely miss, which may result in some response latency for this RT task

[PATCH] sched/rt: Check to push the task when changing its affinity

2015-02-03 Thread Xunlei Pang
From: Xunlei Pang We may suffer from extra rt overload rq due to the affinity, so when the affinity of any runnable rt task is changed, we should check to trigger balancing, otherwise it will cause some unnecessary delayed real-time response. Unfortunately, current RT global scheduler doesn't

[PATCH] sched/rt: Check to push the task when changing its affinity

2015-02-03 Thread Xunlei Pang
From: Xunlei Pang pang.xun...@linaro.org We may suffer from extra rt overload rq due to the affinity, so when the affinity of any runnable rt task is changed, we should check to trigger balancing, otherwise it will cause some unnecessary delayed real-time response. Unfortunately, current RT

[PATCH RESEND 2/2] sched/rt: Add check_preempt_equal_prio() logic in pick_next_task_rt()

2015-02-03 Thread Xunlei Pang
From: Xunlei Pang pang.xun...@linaro.org check_preempt_curr() doesn't call sched_class::check_preempt_curr when the class of current is a higher level. So if there is a DL task running when doing this for RT, check_preempt_equal_prio() will definitely miss, which may result in some response

[PATCH RESEND 1/2] sched/rt: Check to push the task when changing its affinity

2015-02-03 Thread Xunlei Pang
From: Xunlei Pang pang.xun...@linaro.org We may suffer from extra rt overload rq due to the affinity, so when the affinity of any runnable rt task is changed, we should check to trigger balancing, otherwise it will cause some unnecessary delayed real-time response. Unfortunately, current RT

[tip:sched/core] sched/deadline: Modify cpudl:: free_cpus to reflect rd->online

2015-02-01 Thread tip-bot for Xunlei Pang
Commit-ID: 16b269436b7213ebc01dcfcc9dafa8535b676ccb Gitweb: http://git.kernel.org/tip/16b269436b7213ebc01dcfcc9dafa8535b676ccb Author: Xunlei Pang AuthorDate: Mon, 19 Jan 2015 04:49:36 + Committer: Ingo Molnar CommitDate: Fri, 30 Jan 2015 19:39:16 +0100 sched/deadline: Modify

[tip:sched/core] sched/deadline: Modify cpudl:: free_cpus to reflect rd-online

2015-02-01 Thread tip-bot for Xunlei Pang
Commit-ID: 16b269436b7213ebc01dcfcc9dafa8535b676ccb Gitweb: http://git.kernel.org/tip/16b269436b7213ebc01dcfcc9dafa8535b676ccb Author: Xunlei Pang pang.xun...@linaro.org AuthorDate: Mon, 19 Jan 2015 04:49:36 + Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 30 Jan 2015 19:39

Re: [PATCH 5/5] sched/rt: Optimize find_lowest_rq() to select a cache hot cpu

2015-01-29 Thread Xunlei Pang
On 27 January 2015 at 22:56, Steven Rostedt wrote: > On Tue, 27 Jan 2015 15:21:36 +0100 > Peter Zijlstra wrote: > >> On Mon, Jan 19, 2015 at 04:49:40AM +0000, Xunlei Pang wrote: >> > In find_lowest_rq(), if we can't find a wake_affine cpu from >> > sched_domai

[PATCH v3 2/2] rtc: Remove redundant rtc_valid_tm() from rtc_resume()

2015-01-29 Thread Xunlei Pang
From: Xunlei Pang rtc_read_time() has already judged valid tm by rtc_valid_tm(), so just remove it. Signed-off-by: Xunlei Pang --- drivers/rtc/class.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 6100af5..7db4c90 100644 --- a/drivers

[PATCH v3 1/2] time: Don't bother to run rtc_resume() for the nonstop clocksource

2015-01-29 Thread Xunlei Pang
From: Xunlei Pang If a system does not provide a persistent_clock(), the time will be updated on resume by rtc_resume(). With the addition of the non-stop clocksources for suspend timing, those systems set the time on resume in timekeeping_resume(), but may not provide a valid persistent_clock

[PATCH v2 2/4] sched/deadline: Remove cpu_active_mask from cpudl_find()

2015-01-29 Thread Xunlei Pang
From: Xunlei Pang cpu_active_mask is rarely changeable, so remove this operation to gain a little performance. If there is a change in cpu_active_mask, rq_online_dl() and rq_offline_dl() should take care of it normally, so cpudl:: free_cpus carries enough information for us. For the rare case

[PATCH v2 4/4] sched/rt: Consider deadline tasks in cpupri_find()

2015-01-29 Thread Xunlei Pang
From: Xunlei Pang Currently, RT global scheduling doesn't factor deadline tasks, this may cause some problems. See a case below: On a 3 CPU system, CPU0 has one running deadline task, CPU1 has one running low priority RT task or idle, CPU3 has one running high priority RT task. When another mid

[PATCH v2 1/4] sched/deadline: Modify cpudl::free_cpus to reflect root_domain::online

2015-01-29 Thread Xunlei Pang
From: Xunlei Pang Currently, cpudl::free_cpus contains all cpus during init, see cpudl_init(). When calling cpudl_find(), we have to mask rd->span to avoid selecting the cpu outside current root domain, because cpus_allowed is undependable when performing clustered scheduling using the cpu

[PATCH v2 3/4] sched/deadline: Fix wrong cpudl_find() in check_preempt_equal_dl()

2015-01-29 Thread Xunlei Pang
From: Xunlei Pang In check_preempt_equal_dl(), cpudl_find() is called with a NULL later_mask, thus cpudl_find() here doesn't check cpudl::free_cpus at all. This patch takles this issue by always passing a non-NULL later_mask to cpudl_find(), thereby fixing this issue. Signed-off-by: Xunlei

Re: [PATCH 5/5] sched/rt: Optimize find_lowest_rq() to select a cache hot cpu

2015-01-29 Thread Xunlei Pang
On 27 January 2015 at 22:56, Steven Rostedt rost...@goodmis.org wrote: On Tue, 27 Jan 2015 15:21:36 +0100 Peter Zijlstra pet...@infradead.org wrote: On Mon, Jan 19, 2015 at 04:49:40AM +, Xunlei Pang wrote: In find_lowest_rq(), if we can't find a wake_affine cpu from sched_domain

[PATCH v2 3/4] sched/deadline: Fix wrong cpudl_find() in check_preempt_equal_dl()

2015-01-29 Thread Xunlei Pang
From: Xunlei Pang pang.xun...@linaro.org In check_preempt_equal_dl(), cpudl_find() is called with a NULL later_mask, thus cpudl_find() here doesn't check cpudl::free_cpus at all. This patch takles this issue by always passing a non-NULL later_mask to cpudl_find(), thereby fixing this issue

[PATCH v2 4/4] sched/rt: Consider deadline tasks in cpupri_find()

2015-01-29 Thread Xunlei Pang
From: Xunlei Pang pang.xun...@linaro.org Currently, RT global scheduling doesn't factor deadline tasks, this may cause some problems. See a case below: On a 3 CPU system, CPU0 has one running deadline task, CPU1 has one running low priority RT task or idle, CPU3 has one running high priority RT

[PATCH v3 1/2] time: Don't bother to run rtc_resume() for the nonstop clocksource

2015-01-29 Thread Xunlei Pang
From: Xunlei Pang pang.xun...@linaro.org If a system does not provide a persistent_clock(), the time will be updated on resume by rtc_resume(). With the addition of the non-stop clocksources for suspend timing, those systems set the time on resume in timekeeping_resume(), but may not provide

[PATCH v2 1/4] sched/deadline: Modify cpudl::free_cpus to reflect root_domain::online

2015-01-29 Thread Xunlei Pang
From: Xunlei Pang pang.xun...@linaro.org Currently, cpudl::free_cpus contains all cpus during init, see cpudl_init(). When calling cpudl_find(), we have to mask rd-span to avoid selecting the cpu outside current root domain, because cpus_allowed is undependable when performing clustered

[PATCH v2 2/4] sched/deadline: Remove cpu_active_mask from cpudl_find()

2015-01-29 Thread Xunlei Pang
From: Xunlei Pang pang.xun...@linaro.org cpu_active_mask is rarely changeable, so remove this operation to gain a little performance. If there is a change in cpu_active_mask, rq_online_dl() and rq_offline_dl() should take care of it normally, so cpudl:: free_cpus carries enough information

[PATCH v3 2/2] rtc: Remove redundant rtc_valid_tm() from rtc_resume()

2015-01-29 Thread Xunlei Pang
From: Xunlei Pang pang.xun...@linaro.org rtc_read_time() has already judged valid tm by rtc_valid_tm(), so just remove it. Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/class.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c

Re: [RFC PATCH v3 0/8] Provide y2038/y2106 safe rtc_class_ops.set_mmss64()

2015-01-28 Thread Xunlei Pang
ping Alessandro On 21 January 2015 at 00:21, Xunlei Pang wrote: > This patch series relies on a former patchset[1], it provides y2038/y2106 > safe rtc_class_ops.set_mmss64(), and converts some possible users of > set_mmss() > to use set_mmss64(), in the hope that making these us

Re: [PATCH v2 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP

2015-01-28 Thread Xunlei Pang
Hi Thomas, On 25 January 2015 at 01:07, Thomas Gleixner wrote: > On Sat, 24 Jan 2015, Xunlei Pang wrote: > >> Before this, I tried to add some code to catch such problem at the >> time of registering the clocksource, like using the >> CLOCKSOURCE_MASK(), for example 64bit

Re: [PATCH 3/5] sched/deadline: Fix wrong cpudl_find() in check_preempt_equal_dl()

2015-01-28 Thread Xunlei Pang
Hi Peter, On 28 January 2015 at 00:47, Peter Zijlstra wrote: > On Mon, Jan 19, 2015 at 04:49:38AM +0000, Xunlei Pang wrote: >> In check_preempt_equal_dl(), cpudl_find() is called with a NULL >> later_mask, thus cpudl_find() here doesn't check cpudl::free_cpus >> at all. &g

Re: [PATCH 4/5] sched/rt: Consider deadline tasks in cpupri_find()

2015-01-28 Thread Xunlei Pang
Hi Steven, On 28 January 2015 at 07:04, Steven Rostedt wrote: > On Tue, 27 Jan 2015 13:58:59 +0100 > Peter Zijlstra wrote: > > >> Not a bad idea, Cc'ed Steve who likes to look after the RT bits, >> excessive quoting for him. > > Yep I do. > > >> > index ade2958..48c9576 100644 >> > ---

Re: [PATCH 3/5] sched/deadline: Fix wrong cpudl_find() in check_preempt_equal_dl()

2015-01-28 Thread Xunlei Pang
Hi Peter, On 28 January 2015 at 00:47, Peter Zijlstra pet...@infradead.org wrote: On Mon, Jan 19, 2015 at 04:49:38AM +, Xunlei Pang wrote: In check_preempt_equal_dl(), cpudl_find() is called with a NULL later_mask, thus cpudl_find() here doesn't check cpudl::free_cpus at all. This patch

Re: [PATCH 4/5] sched/rt: Consider deadline tasks in cpupri_find()

2015-01-28 Thread Xunlei Pang
Hi Steven, On 28 January 2015 at 07:04, Steven Rostedt rost...@goodmis.org wrote: On Tue, 27 Jan 2015 13:58:59 +0100 Peter Zijlstra pet...@infradead.org wrote: Not a bad idea, Cc'ed Steve who likes to look after the RT bits, excessive quoting for him. Yep I do. index ade2958..48c9576

Re: [PATCH v2 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP

2015-01-28 Thread Xunlei Pang
Hi Thomas, On 25 January 2015 at 01:07, Thomas Gleixner t...@linutronix.de wrote: On Sat, 24 Jan 2015, Xunlei Pang wrote: Before this, I tried to add some code to catch such problem at the time of registering the clocksource, like using the CLOCKSOURCE_MASK(), for example 64bit counter

Re: [RFC PATCH v3 0/8] Provide y2038/y2106 safe rtc_class_ops.set_mmss64()

2015-01-28 Thread Xunlei Pang
ping Alessandro On 21 January 2015 at 00:21, Xunlei Pang pang.xun...@linaro.org wrote: This patch series relies on a former patchset[1], it provides y2038/y2106 safe rtc_class_ops.set_mmss64(), and converts some possible users of set_mmss() to use set_mmss64(), in the hope that making

Re: [PATCH 1/5] sched/deadline: Modify cpudl::free_cpus to reflect rd->online

2015-01-23 Thread Xunlei Pang
Hi Peter, Juri, Could you please give some comments on these 5 patches? Thanks for your time. Regards, Xunlei On 19 January 2015 at 12:49, Xunlei Pang wrote: > Currently, cpudl::free_cpus contains all cpus during init, see > cpudl_init(). When calling cpudl_find(), we have to add rd

Re: [PATCH v2 1/3] time: Don't bother to run rtc_resume() for the nonstop clocksource

2015-01-23 Thread Xunlei Pang
On 23 January 2015 at 02:30, John Stultz wrote: > On Thu, Jan 22, 2015 at 4:01 AM, Xunlei Pang wrote: >> If a system does not provide a persistent_clock(), the time >> will be updated on resume by rtc_resume(). With the addition >> of the non-stop clocksources for suspend

Re: [PATCH v2 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP

2015-01-23 Thread Xunlei Pang
Hi Thomas, On 23 January 2015 at 05:07, Thomas Gleixner wrote: > On Thu, 22 Jan 2015, Xunlei Pang wrote: >> When doing timekeeping_resume(), if the nonstop clocksource >> wraps back, "cycle_delta" will miss the wrap time. >> >> It's hard to det

Re: [PATCH v2 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP

2015-01-23 Thread Xunlei Pang
Hi Thomas, On 23 January 2015 at 05:07, Thomas Gleixner t...@linutronix.de wrote: On Thu, 22 Jan 2015, Xunlei Pang wrote: When doing timekeeping_resume(), if the nonstop clocksource wraps back, cycle_delta will miss the wrap time. It's hard to determine the right CLOCKSOURCE_MASK(xxx

Re: [PATCH v2 1/3] time: Don't bother to run rtc_resume() for the nonstop clocksource

2015-01-23 Thread Xunlei Pang
On 23 January 2015 at 02:30, John Stultz john.stu...@linaro.org wrote: On Thu, Jan 22, 2015 at 4:01 AM, Xunlei Pang pang.xun...@linaro.org wrote: If a system does not provide a persistent_clock(), the time will be updated on resume by rtc_resume(). With the addition of the non-stop

Re: [PATCH 1/5] sched/deadline: Modify cpudl::free_cpus to reflect rd-online

2015-01-23 Thread Xunlei Pang
Hi Peter, Juri, Could you please give some comments on these 5 patches? Thanks for your time. Regards, Xunlei On 19 January 2015 at 12:49, Xunlei Pang pang.xun...@linaro.org wrote: Currently, cpudl::free_cpus contains all cpus during init, see cpudl_init(). When calling cpudl_find(), we have

[PATCH v2 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP

2015-01-22 Thread Xunlei Pang
a comment to indicate that if have this flag set, people are aware that this nonstop clocksource won't wrap back during system suspend/resume. Signed-off-by: Xunlei Pang --- include/linux/clocksource.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/clocksource.h b/inc

[PATCH v2 2/3] rtc: Remove redundant rtc_valid_tm() from rtc_resume()

2015-01-22 Thread Xunlei Pang
rtc_read_time() has already judged valid tm by rtc_valid_tm(), so just remove it. Signed-off-by: Xunlei Pang --- drivers/rtc/class.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 6100af5..7db4c90 100644 --- a/drivers/rtc/class.c +++ b

[PATCH v2 1/3] time: Don't bother to run rtc_resume() for the nonstop clocksource

2015-01-22 Thread Xunlei Pang
in the rtc_resume() logic thinking no one has set the time and it then will over-write the suspend time again, which is not necessary and only increases clock error. So, fix this for rtc_resume(). Signed-off-by: Xunlei Pang --- v1->v2: Modify according to Thomas' feedback. drivers/rtc/clas

[PATCH v2 1/3] time: Don't bother to run rtc_resume() for the nonstop clocksource

2015-01-22 Thread Xunlei Pang
in the rtc_resume() logic thinking no one has set the time and it then will over-write the suspend time again, which is not necessary and only increases clock error. So, fix this for rtc_resume(). Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- v1-v2: Modify according to Thomas' feedback

[PATCH v2 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP

2015-01-22 Thread Xunlei Pang
to indicate that if have this flag set, people are aware that this nonstop clocksource won't wrap back during system suspend/resume. Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- include/linux/clocksource.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/clocksource.h

[PATCH v2 2/3] rtc: Remove redundant rtc_valid_tm() from rtc_resume()

2015-01-22 Thread Xunlei Pang
rtc_read_time() has already judged valid tm by rtc_valid_tm(), so just remove it. Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/class.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 6100af5..7db4c90 100644 --- a/drivers

[PATCH 3/5] rtc: Modify rtc_hctosys() to address y2038 issues

2015-01-21 Thread Xunlei Pang
Reviewed-by: Arnd Bergmann Signed-off-by: Xunlei Pang --- drivers/rtc/hctosys.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c index 4aa60d7..2153b52 100644 --- a/drivers/rtc/hctosys.c +++ b/drivers/rtc/hctosys.c @@ -26,7

[PATCH 5/5] rtc: Convert rtc_set_ntp_time() to use timespec64

2015-01-21 Thread Xunlei Pang
-by: Xunlei Pang --- drivers/rtc/systohc.c | 6 +++--- include/linux/rtc.h | 2 +- kernel/time/ntp.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/systohc.c b/drivers/rtc/systohc.c index e34a07b..22bbe2e 100644 --- a/drivers/rtc/systohc.c +++ b/drivers/rtc

[PATCH 4/5] rtc: Remove redundant rtc_valid_tm() from rtc_hctosys()

2015-01-21 Thread Xunlei Pang
rtc_read_time() has already judged valid tm by rtc_valid_tm(), so just remove it. Reviewed-by: John Stultz Reviewed-by: Arnd Bergmann Signed-off-by: Xunlei Pang --- drivers/rtc/hctosys.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c

[PATCH 2/5] drivers/rtc/rtc-dev.c: Update code to use y2038-safe time interfaces

2015-01-21 Thread Xunlei Pang
Currently, rtc-dev.c uses y2038 problematic rtc_tm_to_time() and rtc_time_to_tm(). So replace them with their corresponding y2038-safe versions: rtc_tm_to_time64() and rtc_time64_to_tm(). Reviewed-by: John Stultz Reviewed-by: Arnd Bergmann Signed-off-by: Xunlei Pang --- drivers/rtc/rtc-dev.c

[PATCH 1/5] drivers/rtc/interface.c: Update code to use y2038-safe time interfaces

2015-01-21 Thread Xunlei Pang
Currently, interface.c uses y2038 problematic rtc_tm_to_time() and rtc_time_to_tm(). So replace them with their corresponding y2038-safe versions: rtc_tm_to_time64() and rtc_time64_to_tm(). Reviewed-by: John Stultz Reviewed-by: Arnd Bergmann Signed-off-by: Xunlei Pang --- drivers/rtc

[PATCH 3/5] rtc: Modify rtc_hctosys() to address y2038 issues

2015-01-21 Thread Xunlei Pang
john.stu...@linaro.org Reviewed-by: Arnd Bergmann arnd.bergm...@linaro.org Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/hctosys.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c index 4aa60d7..2153b52 100644

[PATCH 5/5] rtc: Convert rtc_set_ntp_time() to use timespec64

2015-01-21 Thread Xunlei Pang
arnd.bergm...@linaro.org Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/systohc.c | 6 +++--- include/linux/rtc.h | 2 +- kernel/time/ntp.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/systohc.c b/drivers/rtc/systohc.c index e34a07b

[PATCH 4/5] rtc: Remove redundant rtc_valid_tm() from rtc_hctosys()

2015-01-21 Thread Xunlei Pang
rtc_read_time() has already judged valid tm by rtc_valid_tm(), so just remove it. Reviewed-by: John Stultz john.stu...@linaro.org Reviewed-by: Arnd Bergmann arnd.bergm...@linaro.org Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/hctosys.c | 8 1 file changed, 8

[PATCH 2/5] drivers/rtc/rtc-dev.c: Update code to use y2038-safe time interfaces

2015-01-21 Thread Xunlei Pang
-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/rtc-dev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index d049393..799c34b 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c @@ -304,12 +304,12

[PATCH 1/5] drivers/rtc/interface.c: Update code to use y2038-safe time interfaces

2015-01-21 Thread Xunlei Pang
-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/interface.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index db44df8..c6be2bb 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc

[PATCH 1/3] time: Don't bother to run rtc_resume() for nonstop clocksource

2015-01-20 Thread Xunlei Pang
in the rtc_resume() logic thinking no one has set the time and it then will over-write the suspend time again, which is not necessary and only increases clock error. So, fix this for rtc_resume(). Signed-off-by: Xunlei Pang --- drivers/rtc/class.c | 2 +- include/linux/timekeeping.h | 11

[PATCH 2/3] rtc: Remove redundant rtc_valid_tm() from rtc_resume()

2015-01-20 Thread Xunlei Pang
rtc_read_time() has already judged valid tm by rtc_valid_tm(), so just remove it. Signed-off-by: Xunlei Pang --- drivers/rtc/class.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index c8f35a5..5953225 100644 --- a/drivers/rtc/class.c +++ b

[PATCH 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP

2015-01-20 Thread Xunlei Pang
When doing timekeeping_resume(), if the nonstop clocksource wraps back, "cycle_delta" will miss the wrap time. So add a comment to indicate that if have this flag set, you are aware that this nonstop clocksource won't wrap during suspension. Signed-off-by: Xunlei Pang --- inc

[RFC PATCH v3 1/8] rtc: Provide y2038 safe rtc_class_ops.set_mmss() replacement

2015-01-20 Thread Xunlei Pang
to use set_mmss64(), it can be removed when having no users. Signed-off-by: Xunlei Pang --- drivers/rtc/interface.c | 7 ++- drivers/rtc/systohc.c | 5 - include/linux/rtc.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/interface.c b/drivers/rtc

[RFC PATCH v3 0/8] Provide y2038/y2106 safe rtc_class_ops.set_mmss64()

2015-01-20 Thread Xunlei Pang
: https://lkml.org/lkml/2014/11/27/341 [3] v2: https://lkml.org/lkml/2015/1/13/403 v2->v3: * Remove get_seconds64(), use ktime_get_real_seconds() to replace get_seconds() * Refine rtc-test.c Xunlei Pang (8): rtc: Provide y2038 safe rtc_class_ops.set_mmss() replacement rtc/test: Update dri

[RFC PATCH v3 2/8] rtc/test: Update driver to address y2038/y2106 issues

2015-01-20 Thread Xunlei Pang
mss64" module parameter. Signed-off-by: Xunlei Pang --- drivers/rtc/rtc-test.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c index 8f86fa9..3a2da4c 100644 --- a/drivers/rtc/rtc-test.c +++ b/drivers/rtc/

[RFC PATCH v3 4/8] rtc/mc13xxx: Update driver to address y2038/y2106 issues

2015-01-20 Thread Xunlei Pang
-by: Xunlei Pang --- drivers/rtc/rtc-mc13xxx.c | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/drivers/rtc/rtc-mc13xxx.c b/drivers/rtc/rtc-mc13xxx.c index 5bce904b..32df1d8 100644 --- a/drivers/rtc/rtc-mc13xxx.c +++ b/drivers/rtc/rtc-mc13xxx.c @@ -83,20

[RFC PATCH v3 5/8] rtc/mxc: Modify rtc_update_alarm() not to touch the alarm time

2015-01-20 Thread Xunlei Pang
rtc_class_ops's set_alarm() shouldn't deal with the alarm date, as this is handled in the rtc core. See rtc_dev_ioctl()'s RTC_ALM_SET and RTC_WKALM_SET cases. Signed-off-by: Xunlei Pang --- drivers/rtc/rtc-mxc.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions

[RFC PATCH v3 3/8] rtc/ab3100: Update driver to address y2038/y2106 issues

2015-01-20 Thread Xunlei Pang
remaining y2038/y2106 issues. Signed-off-by: Xunlei Pang --- drivers/rtc/rtc-ab3100.c | 55 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/drivers/rtc/rtc-ab3100.c b/drivers/rtc/rtc-ab3100.c index 1d0340f..9b725c5 100644

[RFC PATCH v3 6/8] rtc/mxc: Convert get_alarm_or_time()/set_alarm_or_time() to use time64_t

2015-01-20 Thread Xunlei Pang
eparations. Signed-off-by: Xunlei Pang --- drivers/rtc/rtc-mxc.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index a7b218f..83cba23 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c

[RFC PATCH v3 8/8] alpha: rtc: change to use rtc_class_ops's set_mmss64()

2015-01-20 Thread Xunlei Pang
change alpha_rtc_set_mmss() and remote_set_mmss() to use rtc_class_ops's set_mmss64(). Signed-off-by: Xunlei Pang --- arch/alpha/kernel/rtc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/alpha/kernel/rtc.c b/arch/alpha/kernel/rtc.c index c8d284d..f535a3f

[RFC PATCH v3 7/8] rtc/mxc: Update driver to address y2038/y2106 issues

2015-01-20 Thread Xunlei Pang
remaining y2038/y2106 issues. Signed-off-by: Xunlei Pang --- drivers/rtc/rtc-mxc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index 83cba23..09d422b 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c @@ -286,7

[RFC PATCH v3 0/8] Provide y2038/y2106 safe rtc_class_ops.set_mmss64()

2015-01-20 Thread Xunlei Pang
: https://lkml.org/lkml/2014/11/27/341 [3] v2: https://lkml.org/lkml/2015/1/13/403 v2-v3: * Remove get_seconds64(), use ktime_get_real_seconds() to replace get_seconds() * Refine rtc-test.c Xunlei Pang (8): rtc: Provide y2038 safe rtc_class_ops.set_mmss() replacement rtc/test: Update driver

[RFC PATCH v3 1/8] rtc: Provide y2038 safe rtc_class_ops.set_mmss() replacement

2015-01-20 Thread Xunlei Pang
to use set_mmss64(), it can be removed when having no users. Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/interface.c | 7 ++- drivers/rtc/systohc.c | 5 - include/linux/rtc.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/rtc

[PATCH 2/3] rtc: Remove redundant rtc_valid_tm() from rtc_resume()

2015-01-20 Thread Xunlei Pang
rtc_read_time() has already judged valid tm by rtc_valid_tm(), so just remove it. Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/class.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index c8f35a5..5953225 100644 --- a/drivers

[PATCH 3/3] time: clocksource: Add a comment to CLOCK_SOURCE_SUSPEND_NONSTOP

2015-01-20 Thread Xunlei Pang
When doing timekeeping_resume(), if the nonstop clocksource wraps back, cycle_delta will miss the wrap time. So add a comment to indicate that if have this flag set, you are aware that this nonstop clocksource won't wrap during suspension. Signed-off-by: Xunlei Pang pang.xun...@linaro.org

[PATCH 1/3] time: Don't bother to run rtc_resume() for nonstop clocksource

2015-01-20 Thread Xunlei Pang
in the rtc_resume() logic thinking no one has set the time and it then will over-write the suspend time again, which is not necessary and only increases clock error. So, fix this for rtc_resume(). Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/class.c | 2 +- include/linux

[RFC PATCH v3 6/8] rtc/mxc: Convert get_alarm_or_time()/set_alarm_or_time() to use time64_t

2015-01-20 Thread Xunlei Pang
. Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/rtc-mxc.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index a7b218f..83cba23 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc

[RFC PATCH v3 8/8] alpha: rtc: change to use rtc_class_ops's set_mmss64()

2015-01-20 Thread Xunlei Pang
change alpha_rtc_set_mmss() and remote_set_mmss() to use rtc_class_ops's set_mmss64(). Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- arch/alpha/kernel/rtc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/alpha/kernel/rtc.c b/arch/alpha/kernel/rtc.c index

[RFC PATCH v3 3/8] rtc/ab3100: Update driver to address y2038/y2106 issues

2015-01-20 Thread Xunlei Pang
remaining y2038/y2106 issues. Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/rtc-ab3100.c | 55 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/drivers/rtc/rtc-ab3100.c b/drivers/rtc/rtc-ab3100.c index 1d0340f

[RFC PATCH v3 7/8] rtc/mxc: Update driver to address y2038/y2106 issues

2015-01-20 Thread Xunlei Pang
remaining y2038/y2106 issues. Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/rtc-mxc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index 83cba23..09d422b 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers

[RFC PATCH v3 2/8] rtc/test: Update driver to address y2038/y2106 issues

2015-01-20 Thread Xunlei Pang
module parameter. Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/rtc-test.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c index 8f86fa9..3a2da4c 100644 --- a/drivers/rtc/rtc-test.c +++ b

[RFC PATCH v3 4/8] rtc/mc13xxx: Update driver to address y2038/y2106 issues

2015-01-20 Thread Xunlei Pang
-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/rtc-mc13xxx.c | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/drivers/rtc/rtc-mc13xxx.c b/drivers/rtc/rtc-mc13xxx.c index 5bce904b..32df1d8 100644 --- a/drivers/rtc/rtc-mc13xxx.c +++ b/drivers/rtc

[RFC PATCH v3 5/8] rtc/mxc: Modify rtc_update_alarm() not to touch the alarm time

2015-01-20 Thread Xunlei Pang
rtc_class_ops's set_alarm() shouldn't deal with the alarm date, as this is handled in the rtc core. See rtc_dev_ioctl()'s RTC_ALM_SET and RTC_WKALM_SET cases. Signed-off-by: Xunlei Pang pang.xun...@linaro.org --- drivers/rtc/rtc-mxc.c | 22 -- 1 file changed, 4 insertions

[PATCH 4/5] sched/rt: Consider deadline tasks in cpupri_find()

2015-01-18 Thread Xunlei Pang
use of percpu local_cpu_mask to save an extra mask allocation, so always passing a non-NULL lowest_mask to cpupri_find(). Signed-off-by: Xunlei Pang --- kernel/sched/core.c | 2 ++ kernel/sched/cpupri.c | 22 +- kernel/sched/cpupri.h | 1 + kernel/sched/rt.c | 9 +

[PATCH 2/5] sched/deadline: Remove cpu_active_mask from cpudl_find()

2015-01-18 Thread Xunlei Pang
onto a dying cpu) which rq_offline_dl() can't handle timely, then it can be handled through _cpu_down()->...->multi_cpu_stop()->migration_call() ->migrate_tasks(), preventing the task from hanging on the dead cpu. Signed-off-by: Xunlei Pang --- kernel/sched/cpudeadline.c | 3 +-- 1 fil

[PATCH 3/5] sched/deadline: Fix wrong cpudl_find() in check_preempt_equal_dl()

2015-01-18 Thread Xunlei Pang
In check_preempt_equal_dl(), cpudl_find() is called with a NULL later_mask, thus cpudl_find() here doesn't check cpudl::free_cpus at all. This patch takles this issue by always passing a non-NULL later_mask to cpudl_find(), thereby fixing this issue. Signed-off-by: Xunlei Pang --- kernel/sched

[PATCH 5/5] sched/rt: Optimize find_lowest_rq() to select a cache hot cpu

2015-01-18 Thread Xunlei Pang
interation of sched_domain() in passing. Signed-off-by: Xunlei Pang --- kernel/sched/rt.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index d28cfa4..e6a42e6 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1535,6 +1535,7

[PATCH 1/5] sched/deadline: Modify cpudl::free_cpus to reflect rd->online

2015-01-18 Thread Xunlei Pang
_rq(). This patch adds cpudl_set_freecpu() and cpudl_clear_freecpu() for changing cpudl::free_cpus when doing rq_online_dl()/rq_offline_dl(), so we can avoid the rd->span operation when calling cpudl_find() in find_later_rq(). Signed-off-by: Xunlei Pang --- kernel/sched/cpudeadline.

<    5   6   7   8   9   10   11   >