Re: [PATCH v5] sched/deadline: remove useless param from setup_new_dl_entity

2016-08-05 Thread Xunlei Pang
sks wakeup time anyway. By doing > so, we don't need to worry about a potential PI donor anymore, as rt_ > mutex_setprio() takes care of that already for us. > > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Steven Rostedt > Cc: Luca Abeni > Cc: Xunlei Pang > Signed-off

Re: [PATCH 3/3] x86/apic: Improved the setting of interrupt mode for bsp

2016-07-25 Thread Xunlei Pang
On 2016/07/25 at 11:04, Wei, Jiangang wrote: > Hi He, > > Thanks for your response firstly. > > On Fri, 2016-07-22 at 18:40 +0800, Baoquan He wrote: >> Hi Jiangang, >> >> This is very nice, should be the stuff Eric and Ingo would like to see. >> But I have several questions: >> >> 1) Are you not

Re: [PATCH 3/3] x86/apic: Improved the setting of interrupt mode for bsp

2016-07-25 Thread Xunlei Pang
On 2016/07/25 at 11:04, Wei, Jiangang wrote: > Hi He, > > Thanks for your response firstly. > > On Fri, 2016-07-22 at 18:40 +0800, Baoquan He wrote: >> Hi Jiangang, >> >> This is very nice, should be the stuff Eric and Ingo would like to see. >> But I have several questions: >> >> 1) Are you not

Re: [PATCH v4] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-21 Thread Xunlei Pang
On 2016/07/21 at 22:46, Juri Lelli wrote: > On 21/07/16 15:36, Juri Lelli wrote: >> On 21/07/16 15:21, Juri Lelli wrote: >>> Hi, >>> >>> On 18/07/16 21:37, Xunlei Pang wrote: >>>> On 2016/07/18 at 21:04, Juri Lelli wrote: >>>>> On 1

Re: [PATCH v4] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-21 Thread Xunlei Pang
On 2016/07/21 at 22:46, Juri Lelli wrote: > On 21/07/16 15:36, Juri Lelli wrote: >> On 21/07/16 15:21, Juri Lelli wrote: >>> Hi, >>> >>> On 18/07/16 21:37, Xunlei Pang wrote: >>>> On 2016/07/18 at 21:04, Juri Lelli wrote: >>>>> On 1

Re: [PATCH v4] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-18 Thread Xunlei Pang
On 2016/07/18 at 21:04, Juri Lelli wrote: > On 15/07/16 18:39, Xunlei Pang wrote: >> On 2016/07/13 at 18:58, Juri Lelli wrote: > [...] > >> Since this is only called for queued cases now, there is no need to >> check boosted stuff here. As enqueue_task(ENQUEUE_REP

Re: [PATCH v4] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-18 Thread Xunlei Pang
On 2016/07/18 at 21:04, Juri Lelli wrote: > On 15/07/16 18:39, Xunlei Pang wrote: >> On 2016/07/13 at 18:58, Juri Lelli wrote: > [...] > >> Since this is only called for queued cases now, there is no need to >> check boosted stuff here. As enqueue_task(ENQUEUE_REP

Re: [PATCH v4] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-15 Thread Xunlei Pang
hile we are at it we also optimize things further calling setup_new_dl_ > entity only for already queued tasks, since (as pointed out by Xunlei) > we already do the very same update at tasks wakeup time anyway. > > Cc: Ingo Molnar <mi...@redhat.com> > Cc: Peter Zijlstra <pet...@infra

Re: [PATCH v4] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-15 Thread Xunlei Pang
hile we are at it we also optimize things further calling setup_new_dl_ > entity only for already queued tasks, since (as pointed out by Xunlei) > we already do the very same update at tasks wakeup time anyway. > > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Steven Rostedt &g

Re: [PATCH] sched/fair: do not announce throttled next buddy in dequeue_task_fair

2016-07-12 Thread Xunlei Pang
On 2016/07/13 at 09:50, Wanpeng Li wrote: > 2016-07-13 1:25 GMT+08:00 <bseg...@google.com>: >> Konstantin Khlebnikov <khlebni...@yandex-team.ru> writes: >> >>> On 11.07.2016 15:12, Xunlei Pang wrote: >>>> On 2016/07/11 at 17:54, Wanpeng Li wrote:

Re: [PATCH] sched/fair: do not announce throttled next buddy in dequeue_task_fair

2016-07-12 Thread Xunlei Pang
On 2016/07/13 at 09:50, Wanpeng Li wrote: > 2016-07-13 1:25 GMT+08:00 : >> Konstantin Khlebnikov writes: >> >>> On 11.07.2016 15:12, Xunlei Pang wrote: >>>> On 2016/07/11 at 17:54, Wanpeng Li wrote: >>>>> Hi Konstantin, Xunlei, >>>>

Re: [V3 PATCH 1/2] x86/panic: Replace smp_send_stop() with kdump friendly version

2016-07-12 Thread Xunlei Pang
On 2016/07/12 at 15:12, 河合英宏 / KAWAI,HIDEHIRO wrote: >> From: linux-kernel-ow...@vger.kernel.org >> [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Xunlei Pang >> Sent: Tuesday, July 12, 2016 3:57 PM >> On 2016/07/12 at 11:56, 河合英宏 / KAWAI,HIDEHIRO wrote: >&

Re: [V3 PATCH 1/2] x86/panic: Replace smp_send_stop() with kdump friendly version

2016-07-12 Thread Xunlei Pang
On 2016/07/12 at 15:12, 河合英宏 / KAWAI,HIDEHIRO wrote: >> From: linux-kernel-ow...@vger.kernel.org >> [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Xunlei Pang >> Sent: Tuesday, July 12, 2016 3:57 PM >> On 2016/07/12 at 11:56, 河合英宏 / KAWAI,HIDEHIRO wrote: >&

Re: [V3 PATCH 1/2] x86/panic: Replace smp_send_stop() with kdump friendly version

2016-07-12 Thread Xunlei Pang
On 2016/07/12 at 11:56, 河合英宏 / KAWAI,HIDEHIRO wrote: > Hi Xunlei, > > Thanks for the review. > >> From: Xunlei Pang [mailto:xp...@redhat.com] >> Sent: Tuesday, July 12, 2016 12:12 PM >> On 2016/07/05 at 19:33, Hidehiro Kawai wrote: >>> This patch fixes one of

Re: [V3 PATCH 1/2] x86/panic: Replace smp_send_stop() with kdump friendly version

2016-07-12 Thread Xunlei Pang
On 2016/07/12 at 11:56, 河合英宏 / KAWAI,HIDEHIRO wrote: > Hi Xunlei, > > Thanks for the review. > >> From: Xunlei Pang [mailto:xp...@redhat.com] >> Sent: Tuesday, July 12, 2016 12:12 PM >> On 2016/07/05 at 19:33, Hidehiro Kawai wrote: >>> This patch fixes one of

Re: [PATCH v2] kexec: Fix kdump failure with notsc

2016-07-12 Thread Xunlei Pang
On 2016/07/07 at 18:17, Wei Jiangang wrote: > If we specify the 'notsc' boot parameter for the dump-capture kernel, > and then trigger a crash(panic) by using "ALT-SysRq-c" or "echo c > > /proc/sysrq-trigger", > the dump-capture kernel will hang in calibrate_delay_converge(): > > /* wait for

Re: [PATCH v2] kexec: Fix kdump failure with notsc

2016-07-12 Thread Xunlei Pang
On 2016/07/07 at 18:17, Wei Jiangang wrote: > If we specify the 'notsc' boot parameter for the dump-capture kernel, > and then trigger a crash(panic) by using "ALT-SysRq-c" or "echo c > > /proc/sysrq-trigger", > the dump-capture kernel will hang in calibrate_delay_converge(): > > /* wait for

Re: [V3 PATCH 1/2] x86/panic: Replace smp_send_stop() with kdump friendly version

2016-07-11 Thread Xunlei Pang
On 2016/07/05 at 19:33, Hidehiro Kawai wrote: > This patch fixes one of the problems reported by Daniel Walker > (https://lkml.org/lkml/2015/6/24/44). > > If crash_kexec_post_notifiers boot option is specified, other CPUs > are stopped by smp_send_stop() instead of machine_crash_shutdown() > in

Re: [V3 PATCH 1/2] x86/panic: Replace smp_send_stop() with kdump friendly version

2016-07-11 Thread Xunlei Pang
On 2016/07/05 at 19:33, Hidehiro Kawai wrote: > This patch fixes one of the problems reported by Daniel Walker > (https://lkml.org/lkml/2015/6/24/44). > > If crash_kexec_post_notifiers boot option is specified, other CPUs > are stopped by smp_send_stop() instead of machine_crash_shutdown() > in

Re: [PATCH] sched/fair: do not announce throttled next buddy in dequeue_task_fair

2016-07-11 Thread Xunlei Pang
On 2016/07/11 at 17:54, Wanpeng Li wrote: > Hi Konstantin, Xunlei, > 2016-07-11 16:42 GMT+08:00 Xunlei Pang <xp...@redhat.com>: >> On 2016/07/11 at 16:22, Xunlei Pang wrote: >>> On 2016/07/11 at 15:25, Wanpeng Li wrote: >>>> 2016-06-16 20:57 GMT+08:00 Konstan

Re: [PATCH] sched/fair: do not announce throttled next buddy in dequeue_task_fair

2016-07-11 Thread Xunlei Pang
On 2016/07/11 at 17:54, Wanpeng Li wrote: > Hi Konstantin, Xunlei, > 2016-07-11 16:42 GMT+08:00 Xunlei Pang : >> On 2016/07/11 at 16:22, Xunlei Pang wrote: >>> On 2016/07/11 at 15:25, Wanpeng Li wrote: >>>> 2016-06-16 20:57 GMT+08:00 Konstantin Khlebnikov >&g

Re: [PATCH] sched/fair: do not announce throttled next buddy in dequeue_task_fair

2016-07-11 Thread Xunlei Pang
On 2016/07/11 at 16:22, Xunlei Pang wrote: > On 2016/07/11 at 15:25, Wanpeng Li wrote: >> 2016-06-16 20:57 GMT+08:00 Konstantin Khlebnikov <khlebni...@yandex-team.ru>: >>> Hierarchy could be already throttled at this point. Throttled next >>> buddy could

Re: [PATCH] sched/fair: do not announce throttled next buddy in dequeue_task_fair

2016-07-11 Thread Xunlei Pang
On 2016/07/11 at 16:22, Xunlei Pang wrote: > On 2016/07/11 at 15:25, Wanpeng Li wrote: >> 2016-06-16 20:57 GMT+08:00 Konstantin Khlebnikov : >>> Hierarchy could be already throttled at this point. Throttled next >>> buddy could trigger null pointer derefer

Re: [PATCH] sched/fair: do not announce throttled next buddy in dequeue_task_fair

2016-07-11 Thread Xunlei Pang
On 2016/07/11 at 15:25, Wanpeng Li wrote: > 2016-06-16 20:57 GMT+08:00 Konstantin Khlebnikov : >> Hierarchy could be already throttled at this point. Throttled next >> buddy could trigger null pointer dereference in pick_next_task_fair(). > There is cfs_rq->next check in

Re: [PATCH] sched/fair: do not announce throttled next buddy in dequeue_task_fair

2016-07-11 Thread Xunlei Pang
On 2016/07/11 at 15:25, Wanpeng Li wrote: > 2016-06-16 20:57 GMT+08:00 Konstantin Khlebnikov : >> Hierarchy could be already throttled at this point. Throttled next >> buddy could trigger null pointer dereference in pick_next_task_fair(). > There is cfs_rq->next check in pick_next_entity(), so how

Re: [PATCH v3] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-11 Thread Xunlei Pang
On 2016/07/11 at 16:01, luca abeni wrote: > Hello, > > On Mon, 11 Jul 2016 13:03:56 +0800 > Xunlei Pang <xp...@redhat.com> wrote: > >> On 2016/07/08 at 19:28, Juri Lelli wrote: > [...] >>> @@ -363,6 +364,15 @@ static inline void setup_new_dl_entity(st

Re: [PATCH v3] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-11 Thread Xunlei Pang
On 2016/07/11 at 16:01, luca abeni wrote: > Hello, > > On Mon, 11 Jul 2016 13:03:56 +0800 > Xunlei Pang wrote: > >> On 2016/07/08 at 19:28, Juri Lelli wrote: > [...] >>> @@ -363,6 +364,15 @@ static inline void setup_new_dl_entity(struct &

Re: [PATCH v3] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-10 Thread Xunlei Pang
On 2016/07/08 at 19:28, Juri Lelli wrote: > setup_new_dl_entity() takes two parameters, but it only actually uses > one of them, under a different name, to setup a new dl_entity, after: > > 2f9f3fdc928 "sched/deadline: Remove dl_new from struct sched_dl_entity" > > as we currently do > >

Re: [PATCH v3] sched/deadline: remove useless param from setup_new_dl_entity

2016-07-10 Thread Xunlei Pang
On 2016/07/08 at 19:28, Juri Lelli wrote: > setup_new_dl_entity() takes two parameters, but it only actually uses > one of them, under a different name, to setup a new dl_entity, after: > > 2f9f3fdc928 "sched/deadline: Remove dl_new from struct sched_dl_entity" > > as we currently do > >

[PATCH] sched/fair: Fix the misuse of cfs_rq in sync_throttle()

2016-07-09 Thread Xunlei Pang
Should update "cfs_rq->throttled_clock_task" other than pcfs_rq's. Signed-off-by: Xunlei Pang <xlp...@redhat.com> --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 4088eed..039de34 100644

[PATCH] sched/fair: Fix the misuse of cfs_rq in sync_throttle()

2016-07-09 Thread Xunlei Pang
Should update "cfs_rq->throttled_clock_task" other than pcfs_rq's. Signed-off-by: Xunlei Pang --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 4088eed..039de34 100644 --- a/kernel/sched

Re: [RFC][PATCH 2/8] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-06-14 Thread Xunlei Pang
On 2016/06/14 at 18:21, Juri Lelli wrote: > Hi, > > On 07/06/16 21:56, Peter Zijlstra wrote: >> From: Xunlei Pang <xlp...@redhat.com> >> >> A crash happened while I was playing with deadline PI rtmutex. >> >> BUG: unable to handle kernel NULL poin

Re: [RFC][PATCH 2/8] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-06-14 Thread Xunlei Pang
On 2016/06/14 at 18:21, Juri Lelli wrote: > Hi, > > On 07/06/16 21:56, Peter Zijlstra wrote: >> From: Xunlei Pang >> >> A crash happened while I was playing with deadline PI rtmutex. >> >> BUG: unable to handle kernel NULL pointer de

[tip:sched/core] sched/fair: Fix the wrong throttled clock time for cfs_rq_clock_task()

2016-06-03 Thread tip-bot for Xunlei Pang
Commit-ID: 1a99ae3f00d3c7c7885ee529ac9a874b19caa0cf Gitweb: http://git.kernel.org/tip/1a99ae3f00d3c7c7885ee529ac9a874b19caa0cf Author: Xunlei Pang <xlp...@redhat.com> AuthorDate: Tue, 10 May 2016 21:03:18 +0800 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Fri, 3 Ju

[tip:sched/core] sched/fair: Fix the wrong throttled clock time for cfs_rq_clock_task()

2016-06-03 Thread tip-bot for Xunlei Pang
Commit-ID: 1a99ae3f00d3c7c7885ee529ac9a874b19caa0cf Gitweb: http://git.kernel.org/tip/1a99ae3f00d3c7c7885ee529ac9a874b19caa0cf Author: Xunlei Pang AuthorDate: Tue, 10 May 2016 21:03:18 +0800 Committer: Ingo Molnar CommitDate: Fri, 3 Jun 2016 09:18:56 +0200 sched/fair: Fix the wrong

Re: [PATCH v4 2/2] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-05-30 Thread Xunlei Pang
Ping Could someone have some comments on this bug? On 2016/04/26 at 16:30, Xunlei Pang wrote: > A crash happened while I was playing with deadline PI rtmutex. > > BUG: unable to handle kernel NULL pointer dereference at 0018 > IP: [] rt_mutex_get_top_task+0x1f/0x

Re: [PATCH v4 2/2] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-05-30 Thread Xunlei Pang
Ping Could someone have some comments on this bug? On 2016/04/26 at 16:30, Xunlei Pang wrote: > A crash happened while I was playing with deadline PI rtmutex. > > BUG: unable to handle kernel NULL pointer dereference at 0018 > IP: [] rt_mutex_get_top_task+0x1f/0x

Re: [PATCH] sched/fair: Fix the wrong throttled clock time for cfs_rq_clock_task()

2016-05-30 Thread Xunlei Pang
Ping On 2016/05/12 at 11:36, Xunlei Pang wrote: > On 2016/05/11 at 14:49, Peter Zijlstra wrote: >> On Tue, May 10, 2016 at 11:19:44AM -0700, bseg...@google.com wrote: >>> Xunlei Pang <xlp...@redhat.com> writes: >>> >>>> Two minor fixes for cfs_rq_clock

Re: [PATCH] sched/fair: Fix the wrong throttled clock time for cfs_rq_clock_task()

2016-05-30 Thread Xunlei Pang
Ping On 2016/05/12 at 11:36, Xunlei Pang wrote: > On 2016/05/11 at 14:49, Peter Zijlstra wrote: >> On Tue, May 10, 2016 at 11:19:44AM -0700, bseg...@google.com wrote: >>> Xunlei Pang writes: >>> >>>> Two minor fixes for cfs_rq_clock_task(). >>>>

Re: [PATCH] sched/fair: Fix the wrong throttled clock time for cfs_rq_clock_task()

2016-05-11 Thread Xunlei Pang
On 2016/05/11 at 14:49, Peter Zijlstra wrote: > On Tue, May 10, 2016 at 11:19:44AM -0700, bseg...@google.com wrote: >> Xunlei Pang <xlp...@redhat.com> writes: >> >>> Two minor fixes for cfs_rq_clock_task(). >>> 1) If cfs_rq is currently being throttled, we ne

Re: [PATCH] sched/fair: Fix the wrong throttled clock time for cfs_rq_clock_task()

2016-05-11 Thread Xunlei Pang
On 2016/05/11 at 14:49, Peter Zijlstra wrote: > On Tue, May 10, 2016 at 11:19:44AM -0700, bseg...@google.com wrote: >> Xunlei Pang writes: >> >>> Two minor fixes for cfs_rq_clock_task(). >>> 1) If cfs_rq is currently being throttled, we need to subtract th

[PATCH] sched/fair: Fix the wrong throttled clock time for cfs_rq_clock_task()

2016-05-10 Thread Xunlei Pang
Two minor fixes for cfs_rq_clock_task(). 1) If cfs_rq is currently being throttled, we need to subtract the cfs throttled clock time. 2) Make "throttled_clock_task_time" update SMP unrelated. Now UP cases need it as well. Signed-off-by: Xunlei Pang <xlp...@redhat.com> -

[PATCH] sched/fair: Fix the wrong throttled clock time for cfs_rq_clock_task()

2016-05-10 Thread Xunlei Pang
Two minor fixes for cfs_rq_clock_task(). 1) If cfs_rq is currently being throttled, we need to subtract the cfs throttled clock time. 2) Make "throttled_clock_task_time" update SMP unrelated. Now UP cases need it as well. Signed-off-by: Xunlei Pang --- kernel/sched/fair.c |

[tip:sched/urgent] sched/rt, sched/dl: Don't push if task's scheduling class was changed

2016-05-10 Thread tip-bot for Xunlei Pang
Commit-ID: 13b5ab02ae118fc8dfdc2b8597688ec4a11d5b53 Gitweb: http://git.kernel.org/tip/13b5ab02ae118fc8dfdc2b8597688ec4a11d5b53 Author: Xunlei Pang <xlp...@redhat.com> AuthorDate: Mon, 9 May 2016 12:11:31 +0800 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Tue, 10 Ma

[tip:sched/urgent] sched/rt, sched/dl: Don't push if task's scheduling class was changed

2016-05-10 Thread tip-bot for Xunlei Pang
Commit-ID: 13b5ab02ae118fc8dfdc2b8597688ec4a11d5b53 Gitweb: http://git.kernel.org/tip/13b5ab02ae118fc8dfdc2b8597688ec4a11d5b53 Author: Xunlei Pang AuthorDate: Mon, 9 May 2016 12:11:31 +0800 Committer: Ingo Molnar CommitDate: Tue, 10 May 2016 10:02:46 +0200 sched/rt, sched/dl: Don't

[PATCH] sched/rt/deadline: Don't push if task's scheduling class was changed

2016-05-08 Thread Xunlei Pang
eck in find_lock_later_rq() after double_lock_balance(), if the scheduling class of the deadline task was changed, break and retry. Apply the same logic to RT. Signed-off-by: Xunlei Pang <xlp...@redhat.com> --- kernel/sched/deadline.c | 1 + kernel/sched/rt.c | 1 + 2 files changed, 2 i

[PATCH] sched/rt/deadline: Don't push if task's scheduling class was changed

2016-05-08 Thread Xunlei Pang
eck in find_lock_later_rq() after double_lock_balance(), if the scheduling class of the deadline task was changed, break and retry. Apply the same logic to RT. Signed-off-by: Xunlei Pang --- kernel/sched/deadline.c | 1 + kernel/sched/rt.c | 1 + 2 files changed, 2 insertions(+) diff --git a

[PATCH v4 2/2] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-04-26 Thread Xunlei Pang
rtmutex. Originally-From: Peter Zijlstra <pet...@infradead.org> Signed-off-by: Xunlei Pang <xlp...@redhat.com> --- v3 -> v4: Cache a task_struct pi_top_task pointer instead of rt_mutex_waiter. include/linux/init_task.h | 1 + include/linux/sched.h | 2 ++ include/linux/sched/rt.h | 1

[PATCH v4 2/2] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-04-26 Thread Xunlei Pang
. Originally-From: Peter Zijlstra Signed-off-by: Xunlei Pang --- v3 -> v4: Cache a task_struct pi_top_task pointer instead of rt_mutex_waiter. include/linux/init_task.h | 1 + include/linux/sched.h | 2 ++ include/linux/sched/rt.h | 1 + kernel/fork.c

[PATCH v4 1/2] rtmutex: Deboost before waking up the top waiter

2016-04-26 Thread Xunlei Pang
Suggested-by: Peter Zijlstra <pet...@infradead.org> Signed-off-by: Xunlei Pang <xlp...@redhat.com> --- v3 -> v4: Improved changelog. kernel/futex.c | 5 ++--- kernel/locking/rtmutex.c| 28 kernel/locking/rtmutex_common.h | 1 + 3

[PATCH v4 1/2] rtmutex: Deboost before waking up the top waiter

2016-04-26 Thread Xunlei Pang
Suggested-by: Peter Zijlstra Signed-off-by: Xunlei Pang --- v3 -> v4: Improved changelog. kernel/futex.c | 5 ++--- kernel/locking/rtmutex.c| 28 kernel/locking/rtmutex_common.h | 1 + 3 files changed, 27 insertions(+), 7 deletions(-) diff

[PATCH v3] s390/kexec: Consolidate crash_map/unmap_reserved_pages() and arch_kexec_protect(unprotect)_crashkres()

2016-04-25 Thread Xunlei Pang
om> Cc: Heiko Carstens <heiko.carst...@de.ibm.com> Signed-off-by: Xunlei Pang <xlp...@redhat.com> Signed-off-by: Michael Holzheu <holz...@linux.vnet.ibm.com> --- Changes from v2: Improved changelog. Changes from v1: 1)Merged with Michael's changes: s390/kdump: Consolidate crash_m

[PATCH v3] s390/kexec: Consolidate crash_map/unmap_reserved_pages() and arch_kexec_protect(unprotect)_crashkres()

2016-04-25 Thread Xunlei Pang
ash memory to be mapped initially, this is done in machine_kdump_pm_init() which is after reserve_crashkernel(). Once kdump kernel is loaded, the new arch_kexec_protect_crashkres() implemented for S390 will actually unmap the pgtable like before. Acked-by: Michael Holzheu Cc: Heiko Carstens Signed-off-

[tip:sched/core] sched/deadline: Fix a bug in dl_overflow()

2016-04-23 Thread tip-bot for Xunlei Pang
Commit-ID: fec148c000d0f9ac21679601722811eb60b4cc52 Gitweb: http://git.kernel.org/tip/fec148c000d0f9ac21679601722811eb60b4cc52 Author: Xunlei Pang <xlp...@redhat.com> AuthorDate: Thu, 14 Apr 2016 20:19:28 +0800 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Sat, 23 Ap

[tip:sched/core] sched/deadline: Fix a bug in dl_overflow()

2016-04-23 Thread tip-bot for Xunlei Pang
Commit-ID: fec148c000d0f9ac21679601722811eb60b4cc52 Gitweb: http://git.kernel.org/tip/fec148c000d0f9ac21679601722811eb60b4cc52 Author: Xunlei Pang AuthorDate: Thu, 14 Apr 2016 20:19:28 +0800 Committer: Ingo Molnar CommitDate: Sat, 23 Apr 2016 14:20:43 +0200 sched/deadline: Fix a bug

Re: [PATCH v3 2/6] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-04-21 Thread Xunlei Pang
Hi Peter, On 2016/04/20 at 21:49, Xunlei Pang wrote: > On 2016/04/20 at 21:19, Peter Zijlstra wrote: >> On Thu, Apr 14, 2016 at 07:37:03PM +0800, Xunlei Pang wrote: >>> + /* Updated under pi_lock and rtmutex lock */ >>> struct rb_node *pi_waiters_leftm

Re: [PATCH v3 2/6] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-04-21 Thread Xunlei Pang
Hi Peter, On 2016/04/20 at 21:49, Xunlei Pang wrote: > On 2016/04/20 at 21:19, Peter Zijlstra wrote: >> On Thu, Apr 14, 2016 at 07:37:03PM +0800, Xunlei Pang wrote: >>> + /* Updated under pi_lock and rtmutex lock */ >>> struct rb_node *pi_waiters_leftm

Re: [PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl()

2016-04-20 Thread Xunlei Pang
On 2016/04/20 at 21:17, Peter Zijlstra wrote: > On Wed, Apr 20, 2016 at 09:00:32PM +0800, Xunlei Pang wrote: > >>> But what happens? How is it changed when it is blocked? >> The top waiter's policy can be changed by other tasks through >> sched_setattr() syscall

Re: [PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl()

2016-04-20 Thread Xunlei Pang
On 2016/04/20 at 21:17, Peter Zijlstra wrote: > On Wed, Apr 20, 2016 at 09:00:32PM +0800, Xunlei Pang wrote: > >>> But what happens? How is it changed when it is blocked? >> The top waiter's policy can be changed by other tasks through >> sched_setattr() syscall

Re: [PATCH v3 2/6] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-04-20 Thread Xunlei Pang
On 2016/04/20 at 21:19, Peter Zijlstra wrote: > On Thu, Apr 14, 2016 at 07:37:03PM +0800, Xunlei Pang wrote: >> +/* Updated under pi_lock and rtmutex lock */ >> struct rb_node *pi_waiters_leftmost; >> +struct rb_node *pi_waiters_leftmost_copy; &

Re: [PATCH v3 2/6] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-04-20 Thread Xunlei Pang
On 2016/04/20 at 21:19, Peter Zijlstra wrote: > On Thu, Apr 14, 2016 at 07:37:03PM +0800, Xunlei Pang wrote: >> +/* Updated under pi_lock and rtmutex lock */ >> struct rb_node *pi_waiters_leftmost; >> +struct rb_node *pi_waiters_leftmost_copy; &

Re: [PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl()

2016-04-20 Thread Xunlei Pang
On 2016/04/20/ at 20:25, Peter Zijlstra wrote: > On Fri, Apr 15, 2016 at 10:19:12AM +0800, Xunlei Pang wrote: >> On 2016/04/15 at 09:58, Xunlei Pang wrote: >>> On 2016/04/14 at 23:31, Peter Zijlstra wrote: >>>> On Thu, Apr 14, 2016 at 07:37:06PM +0800, Xunlei Pang wro

Re: [PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl()

2016-04-20 Thread Xunlei Pang
On 2016/04/20/ at 20:25, Peter Zijlstra wrote: > On Fri, Apr 15, 2016 at 10:19:12AM +0800, Xunlei Pang wrote: >> On 2016/04/15 at 09:58, Xunlei Pang wrote: >>> On 2016/04/14 at 23:31, Peter Zijlstra wrote: >>>> On Thu, Apr 14, 2016 at 07:37:06PM +0800, Xunlei Pang wro

Re: [PATCH v3 1/6] rtmutex: Deboost before waking up the top waiter

2016-04-18 Thread Xunlei Pang
On 2016/04/18 at 17:02, Thomas Gleixner wrote: > On Mon, 18 Apr 2016, Xunlei Pang wrote: >> On 2016/04/18 at 16:23, Thomas Gleixner wrote: >>> On Thu, 14 Apr 2016, Xunlei Pang wrote: >>>> We should deboost before waking the high-prio task such that >>>

Re: [PATCH v3 1/6] rtmutex: Deboost before waking up the top waiter

2016-04-18 Thread Xunlei Pang
On 2016/04/18 at 17:02, Thomas Gleixner wrote: > On Mon, 18 Apr 2016, Xunlei Pang wrote: >> On 2016/04/18 at 16:23, Thomas Gleixner wrote: >>> On Thu, 14 Apr 2016, Xunlei Pang wrote: >>>> We should deboost before waking the high-prio task such that >>>

Re: [PATCH v3 1/6] rtmutex: Deboost before waking up the top waiter

2016-04-18 Thread Xunlei Pang
On 2016/04/18 at 16:23, Thomas Gleixner wrote: > On Thu, 14 Apr 2016, Xunlei Pang wrote: >> We should deboost before waking the high-prio task such that >> we don't run two tasks with the 'same' priority. > No. This is fundamentaly broken. > > T1 (prio 0) lock(X) >

Re: [PATCH v3 1/6] rtmutex: Deboost before waking up the top waiter

2016-04-18 Thread Xunlei Pang
On 2016/04/18 at 16:23, Thomas Gleixner wrote: > On Thu, 14 Apr 2016, Xunlei Pang wrote: >> We should deboost before waking the high-prio task such that >> we don't run two tasks with the 'same' priority. > No. This is fundamentaly broken. > > T1 (prio 0) lock(X) >

Re: [PATCH] sched/deadline: Fix a bug in dl_overflow()

2016-04-15 Thread Xunlei Pang
On 2016/04/15 at 15:07, Juri Lelli wrote: > [+Luca] > > Hi, > > On 14/04/16 20:19, Xunlei Pang wrote: >> I got a minus(very big) dl_b->total_bw during my deadline tests. >> >> # grep dl /proc/sched_debug >> dl_rq[0]: >> .dl_

Re: [PATCH] sched/deadline: Fix a bug in dl_overflow()

2016-04-15 Thread Xunlei Pang
On 2016/04/15 at 15:07, Juri Lelli wrote: > [+Luca] > > Hi, > > On 14/04/16 20:19, Xunlei Pang wrote: >> I got a minus(very big) dl_b->total_bw during my deadline tests. >> >> # grep dl /proc/sched_debug >> dl_rq[0]: >> .dl_

Re: [PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl()

2016-04-14 Thread Xunlei Pang
On 2016/04/15 at 09:58, Xunlei Pang wrote: > On 2016/04/14 at 23:31, Peter Zijlstra wrote: >> On Thu, Apr 14, 2016 at 07:37:06PM +0800, Xunlei Pang wrote: >>> We access @pi_task's data without any lock in enqueue_task_dl(), though >>> checked "dl_prio(pi_task-

Re: [PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl()

2016-04-14 Thread Xunlei Pang
On 2016/04/15 at 09:58, Xunlei Pang wrote: > On 2016/04/14 at 23:31, Peter Zijlstra wrote: >> On Thu, Apr 14, 2016 at 07:37:06PM +0800, Xunlei Pang wrote: >>> We access @pi_task's data without any lock in enqueue_task_dl(), though >>> checked "dl_prio(pi_task-

Re: [PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl()

2016-04-14 Thread Xunlei Pang
On 2016/04/14 at 23:31, Peter Zijlstra wrote: > On Thu, Apr 14, 2016 at 07:37:06PM +0800, Xunlei Pang wrote: >> We access @pi_task's data without any lock in enqueue_task_dl(), though >> checked "dl_prio(pi_task->normal_prio)" condition, that's not enough. &

Re: [PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl()

2016-04-14 Thread Xunlei Pang
On 2016/04/14 at 23:31, Peter Zijlstra wrote: > On Thu, Apr 14, 2016 at 07:37:06PM +0800, Xunlei Pang wrote: >> We access @pi_task's data without any lock in enqueue_task_dl(), though >> checked "dl_prio(pi_task->normal_prio)" condition, that's not enough. &

[PATCH] sched/deadline: Fix a bug in dl_overflow()

2016-04-14 Thread Xunlei Pang
not a deadline task. dl_overflow() simply returns success without updating the right data, and got the wrong dl_bw->total_bw. The solution is simple, if @p is not deadline, don't return. Signed-off-by: Xunlei Pang <xlp...@redhat.com> --- kernel/sched/core.c | 3 ++- 1 file cha

[PATCH] sched/deadline: Fix a bug in dl_overflow()

2016-04-14 Thread Xunlei Pang
not a deadline task. dl_overflow() simply returns success without updating the right data, and got the wrong dl_bw->total_bw. The solution is simple, if @p is not deadline, don't return. Signed-off-by: Xunlei Pang --- kernel/sched/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 delet

[PATCH v3 0/6] sched/deadline/rtmutex: Fix two deadline PI issues

2016-04-14 Thread Xunlei Pang
ata (dl.dl_runtime and dl.dl_period), because the access is not holding any lock(pi lock or rq lock) of pi_task's. PATCH 3~4 are separated out to make PATCH 5 smaller and easier to reviewers. The two issues can be fixed using the same logic, so bind them together as one series. Xunlei Pang (6): rtmu

[PATCH v3 0/6] sched/deadline/rtmutex: Fix two deadline PI issues

2016-04-14 Thread Xunlei Pang
ata (dl.dl_runtime and dl.dl_period), because the access is not holding any lock(pi lock or rq lock) of pi_task's. PATCH 3~4 are separated out to make PATCH 5 smaller and easier to reviewers. The two issues can be fixed using the same logic, so bind them together as one series. Xunlei Pang (6): rtmu

[PATCH v3 3/6] rtmutex: Move "rt_mutex_waiter" definition to "include/linux/rtmutex.h"

2016-04-14 Thread Xunlei Pang
Deadline code will need it, so make it visible to deadline. Signed-off-by: Xunlei Pang <xlp...@redhat.com> --- include/linux/rtmutex.h | 22 +- kernel/locking/rtmutex_common.h | 21 - 2 files changed, 21 insertions(+), 22 deletions(-) diff

[PATCH v3 3/6] rtmutex: Move "rt_mutex_waiter" definition to "include/linux/rtmutex.h"

2016-04-14 Thread Xunlei Pang
Deadline code will need it, so make it visible to deadline. Signed-off-by: Xunlei Pang --- include/linux/rtmutex.h | 22 +- kernel/locking/rtmutex_common.h | 21 - 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/include/linux

[PATCH v3 1/6] rtmutex: Deboost before waking up the top waiter

2016-04-14 Thread Xunlei Pang
We should deboost before waking the high-prio task such that we don't run two tasks with the 'same' priority. The patch fixed the logic, and introduced rt_mutex_postunlock() to do some code refactor. Suggested-by: Peter Zijlstra <pet...@infradead.org> Signed-off-by: Xunlei Pan

[PATCH v3 1/6] rtmutex: Deboost before waking up the top waiter

2016-04-14 Thread Xunlei Pang
We should deboost before waking the high-prio task such that we don't run two tasks with the 'same' priority. The patch fixed the logic, and introduced rt_mutex_postunlock() to do some code refactor. Suggested-by: Peter Zijlstra Signed-off-by: Xunlei Pang --- kernel/futex.c

[PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl()

2016-04-14 Thread Xunlei Pang
l() which held rq lock. Note that, now we return a rt_mutex_waiter to enqueue_task_dl(), we add a new "struct sched_dl_entity_fake" to fake as a real sched_dl_entity, this is ok as long as we keep the "dl_runtime" and "dl_period" in it the same order as that in

[PATCH v3 6/6] sched/deadline/rtmutex: Don't miss the dl_runtime/dl_period update

2016-04-14 Thread Xunlei Pang
ntime, dl_period) or boosted waiter changes to !deadline class. Thus, force deadline task not out by adding the !dl_prio() condition. Signed-off-by: Xunlei Pang <xlp...@redhat.com> --- kernel/locking/rtmutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/lock

[PATCH v3 6/6] sched/deadline/rtmutex: Don't miss the dl_runtime/dl_period update

2016-04-14 Thread Xunlei Pang
ntime, dl_period) or boosted waiter changes to !deadline class. Thus, force deadline task not out by adding the !dl_prio() condition. Signed-off-by: Xunlei Pang --- kernel/locking/rtmutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/rtmutex.c b/kernel/locking

[PATCH v3 5/6] sched/deadline/rtmutex: Fix unprotected PI access in enqueue_task_dl()

2016-04-14 Thread Xunlei Pang
l() which held rq lock. Note that, now we return a rt_mutex_waiter to enqueue_task_dl(), we add a new "struct sched_dl_entity_fake" to fake as a real sched_dl_entity, this is ok as long as we keep the "dl_runtime" and "dl_period" in it the same order as that in sch

[PATCH v3 2/6] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-04-14 Thread Xunlei Pang
g> Signed-off-by: Xunlei Pang <xlp...@redhat.com> --- include/linux/init_task.h | 3 ++- include/linux/sched.h | 3 +++ include/linux/sched/deadline.h | 2 ++ kernel/fork.c | 1 + kernel/locking/rtmutex.c | 61 +

[PATCH v3 4/6] sched: Move dl_policy() to "include/linux/sched.h"

2016-04-14 Thread Xunlei Pang
Rtmutex code will need dl_policy(), so make it visible to rtmutex. Signed-off-by: Xunlei Pang <xlp...@redhat.com> --- include/linux/sched.h | 5 + kernel/sched/sched.h | 4 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/linux/sched.h b/include/linux/s

[PATCH v3 4/6] sched: Move dl_policy() to "include/linux/sched.h"

2016-04-14 Thread Xunlei Pang
Rtmutex code will need dl_policy(), so make it visible to rtmutex. Signed-off-by: Xunlei Pang --- include/linux/sched.h | 5 + kernel/sched/sched.h | 4 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 332a6b5..8ad3522

[PATCH v3 2/6] sched/rtmutex/deadline: Fix a PI crash for deadline tasks

2016-04-14 Thread Xunlei Pang
ve the old rt_mutex_adjust_prio() outside the lock. Since we moved the deboost point, in order to avoid current process to be preempted(due to deboost earlier) before finishing wake_up_q(), we also move preempt_disable() before unlocking rtmutex. Originally-From: Peter Zijlstra Signed-off-by: X

Re: [PATCH] sched/deadline/rtmutex: Fix a PI crash for deadline tasks

2016-04-12 Thread Xunlei Pang
On 2016/04/12 at 23:51, Peter Zijlstra wrote: > On Tue, Apr 12, 2016 at 11:08:04AM +0800, Xunlei Pang wrote: >> I spotted another issue, we access pi_task without any lock in >> enqueue_task_dl(), > OK, so I'm on the road and entirely jetlagged, but how can > enqueue_task_d

Re: [PATCH] sched/deadline/rtmutex: Fix a PI crash for deadline tasks

2016-04-12 Thread Xunlei Pang
On 2016/04/12 at 23:51, Peter Zijlstra wrote: > On Tue, Apr 12, 2016 at 11:08:04AM +0800, Xunlei Pang wrote: >> I spotted another issue, we access pi_task without any lock in >> enqueue_task_dl(), > OK, so I'm on the road and entirely jetlagged, but how can > enqueue_task_d

Re: [PATCH] sched/deadline/rtmutex: Fix a PI crash for deadline tasks

2016-04-11 Thread Xunlei Pang
On 2016/04/10 at 16:22, Xunlei Pang wrote: > On 2016/04/09 at 21:29, Peter Zijlstra wrote: >> On Sat, Apr 09, 2016 at 11:25:39AM +0800, Xunlei Pang wrote: >> >>>> In any case, I just realized we do not in fact provide this guarantee >>>> (of pointing to a b

Re: [PATCH] sched/deadline/rtmutex: Fix a PI crash for deadline tasks

2016-04-11 Thread Xunlei Pang
On 2016/04/10 at 16:22, Xunlei Pang wrote: > On 2016/04/09 at 21:29, Peter Zijlstra wrote: >> On Sat, Apr 09, 2016 at 11:25:39AM +0800, Xunlei Pang wrote: >> >>>> In any case, I just realized we do not in fact provide this guarantee >>>> (of pointing to a b

Re: [PATCH] sched/deadline/rtmutex: Fix a PI crash for deadline tasks

2016-04-10 Thread Xunlei Pang
On 2016/04/09 at 21:29, Peter Zijlstra wrote: > On Sat, Apr 09, 2016 at 11:25:39AM +0800, Xunlei Pang wrote: > >>> In any case, I just realized we do not in fact provide this guarantee >>> (of pointing to a blocked task) that needs a bit more work. >> Current pa

Re: [PATCH] sched/deadline/rtmutex: Fix a PI crash for deadline tasks

2016-04-10 Thread Xunlei Pang
On 2016/04/09 at 21:29, Peter Zijlstra wrote: > On Sat, Apr 09, 2016 at 11:25:39AM +0800, Xunlei Pang wrote: > >>> In any case, I just realized we do not in fact provide this guarantee >>> (of pointing to a blocked task) that needs a bit more work. >> Current pa

Re: [PATCH] sched/deadline/rtmutex: Fix a PI crash for deadline tasks

2016-04-08 Thread Xunlei Pang
On 2016/04/09 at 03:28, Steven Rostedt wrote: > On Fri, 8 Apr 2016 15:15:42 -0400 > Steven Rostedt wrote: > >> From what I understand, the slowfn() modifies the task pi_list (or >> rbtree, as it is today). As this is an unlock, the task being woken >> (the next one to grab

Re: [PATCH] sched/deadline/rtmutex: Fix a PI crash for deadline tasks

2016-04-08 Thread Xunlei Pang
On 2016/04/09 at 03:28, Steven Rostedt wrote: > On Fri, 8 Apr 2016 15:15:42 -0400 > Steven Rostedt wrote: > >> From what I understand, the slowfn() modifies the task pi_list (or >> rbtree, as it is today). As this is an unlock, the task being woken >> (the next one to grab the lock) is removed

Re: [PATCH] sched/deadline/rtmutex: Fix a PI crash for deadline tasks

2016-04-08 Thread Xunlei Pang
On 2016/04/09 at 02:59, Peter Zijlstra wrote: > On Fri, Apr 08, 2016 at 02:50:55PM -0400, Steven Rostedt wrote: >> On Fri, 8 Apr 2016 19:38:35 +0200 >> Peter Zijlstra wrote: >> >>> On Fri, Apr 08, 2016 at 12:25:10PM -0400, Steven Rostedt wrote: >>> So the

Re: [PATCH] sched/deadline/rtmutex: Fix a PI crash for deadline tasks

2016-04-08 Thread Xunlei Pang
On 2016/04/09 at 02:59, Peter Zijlstra wrote: > On Fri, Apr 08, 2016 at 02:50:55PM -0400, Steven Rostedt wrote: >> On Fri, 8 Apr 2016 19:38:35 +0200 >> Peter Zijlstra wrote: >> >>> On Fri, Apr 08, 2016 at 12:25:10PM -0400, Steven Rostedt wrote: >>> So the preempt_disable() is to allow us to

[PATCH] sched/rt/deadline: Share cpumask between rt and deadline for SMP scheduling

2016-04-08 Thread Xunlei Pang
sk" was already initiated. After that we again safely removed the NULL cpumask judgement from find_lowest_rq() and find_later_rq(), because "sched_pp_shared_mask" was surely initialized before the first SMP scheduling happens. Inspired-by: Peter Zijlstra <pet...@infradead.org>

<    1   2   3   4   5   6   7   8   9   10   >