Re: [PATCH] irqchip/gic: Enable gic_set_affinity set more than one cpu

2016-10-25 Thread Cheng Chao
on 10/25/2016 06:09 PM, Marc Zyngier wrote: > On 15/10/16 08:23, Cheng Chao wrote: >> On 10/15/2016 01:33 AM, Marc Zyngier wrote: >>>> on 10/13/2016 11:31 PM, Marc Zyngier wrote: >>>>> On Thu, 13 Oct 2016 18:57:14 +0800 >>>>> Cheng Chao wro

Re: [PATCH] irqchip/gic: Enable gic_set_affinity set more than one cpu

2016-10-15 Thread Cheng Chao
On 10/15/2016 01:33 AM, Marc Zyngier wrote: on 10/13/2016 11:31 PM, Marc Zyngier wrote: On Thu, 13 Oct 2016 18:57:14 +0800 Cheng Chao wrote: GIC can distribute an interrupt to more than one cpu, but now, gic_set_affinity sets only one cpu to handle interrupt. What makes you think this is a

Re: [PATCH] irqchip/gic: Enable gic_set_affinity set more than one cpu

2016-10-13 Thread Cheng Chao
Marc, Thanks for your comments. Cheng on 10/13/2016 11:31 PM, Marc Zyngier wrote: > On Thu, 13 Oct 2016 18:57:14 +0800 > Cheng Chao wrote: > >> GIC can distribute an interrupt to more than one cpu, >> but now, gic_set_affinity sets only one cpu to handle interrupt. >

Re: [PATCH] irqchip/gic: Enable gic_set_affinity set more than one cpu

2016-10-13 Thread Cheng Chao
Hi, This patch has been tested on the SOC: ti AM572x and hisilicon hi35xx, it works. Please review this patch. Any suggestions will be welcome,thanks. Cheng on 10/13/2016 06:57 PM, Cheng Chao wrote: > GIC can distribute an interrupt to more than one cpu, > but now, gic_set_affinity set

[PATCH] irqchip/gic: Enable gic_set_affinity set more than one cpu

2016-10-13 Thread Cheng Chao
GIC can distribute an interrupt to more than one cpu, but now, gic_set_affinity sets only one cpu to handle interrupt. Signed-off-by: Cheng Chao --- drivers/irqchip/irq-gic.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq

[tip:sched/core] stop_machine: Avoid a sleep and wakeup in stop_one_cpu()

2016-09-22 Thread tip-bot for Cheng Chao
Commit-ID: bf89a304722f6904009499a31dc68ab9a5c9742e Gitweb: http://git.kernel.org/tip/bf89a304722f6904009499a31dc68ab9a5c9742e Author: Cheng Chao AuthorDate: Wed, 14 Sep 2016 10:01:50 +0800 Committer: Ingo Molnar CommitDate: Thu, 22 Sep 2016 14:53:45 +0200 stop_machine: Avoid a sleep

[tip:sched/core] sched/core: Remove unnecessary initialization in sched_init()

2016-09-22 Thread tip-bot for Cheng Chao
Commit-ID: 0b8473570ce1af3e80da05b59f9321f30253de4d Gitweb: http://git.kernel.org/tip/0b8473570ce1af3e80da05b59f9321f30253de4d Author: Cheng Chao AuthorDate: Wed, 14 Sep 2016 10:18:56 +0800 Committer: Ingo Molnar CommitDate: Thu, 22 Sep 2016 14:53:44 +0200 sched/core: Remove

Re: [PATCH v4] stop_machine: Avoid a sleep and wakeup in the stop_one_cpu()

2016-09-17 Thread Cheng Chao
Hi Peter, What should I do next? Thanks. Cheng on 09/14/2016 10:01 AM, Cheng Chao wrote: > In case @cpu == smp_proccessor_id(), we can avoid a sleep+wakeup > by doing a preemption. > > the caller such as sched_exec can benefit from this change. > > Signed-off-by: Chen

Re: [PATCH v2] sched/core: remove unnecessary initialization in sched_init()

2016-09-17 Thread Cheng Chao
Hi Peter, Would you please review this patch? thanks. Cheng on 09/14/2016 10:23 AM, Cheng Chao wrote: > init_idle() is called immediately after current->sched_class > = &fair_sched_class, init_idle() sets current->sched_class > = &idle_sched_class. > > Signed-

[PATCH v2] sched/core: remove unnecessary initialization in sched_init()

2016-09-13 Thread Cheng Chao
init_idle() is called immediately after current->sched_class = &fair_sched_class, init_idle() sets current->sched_class = &idle_sched_class. Signed-off-by: Cheng Chao Cc: sta...@vger.kernel.org --- kernel/sched/core.c | 5 - 1 file changed, 5 deletions(-) diff --git a/kernel/

[PATCH] sched/core: emove unnecessary initialization in sched_init()

2016-09-13 Thread Cheng Chao
init_idle() is called immediately after current->sched_class = &fair_sched_class, init_idle() sets current->sched_class = &idle_sched_class. Signed-off-by: Cheng Chao Cc: sta...@vger.kernel.org --- kernel/sched/core.c | 5 - 1 file changed, 5 deletions(-) diff --git a/kernel/

Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE

2016-09-13 Thread Cheng Chao
great, __schedule() doesn't need pay any attention to the TASK_DEAD now. on 09/14/2016 12:37 AM, Peter Zijlstra wrote: > On Tue, Sep 13, 2016 at 06:14:27PM +0200, Oleg Nesterov wrote: > >> Me too, and I failed to find something which could be broken... So >> perhaps should make it nop and invest

[PATCH v4] stop_machine: Avoid a sleep and wakeup in the stop_one_cpu()

2016-09-13 Thread Cheng Chao
In case @cpu == smp_proccessor_id(), we can avoid a sleep+wakeup by doing a preemption. the caller such as sched_exec can benefit from this change. Signed-off-by: Cheng Chao Cc: Oleg Nesterov Cc: Peter Zijlstra --- kernel/sched/core.c | 8 ++-- kernel/stop_machine.c | 5 + 2 files

Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE

2016-09-12 Thread Cheng Chao
Peter, thank you. on 09/12/2016 07:41 PM, Peter Zijlstra wrote: > On Mon, Sep 12, 2016 at 01:37:27PM +0200, Peter Zijlstra wrote: >> So what you're saying is that migration_stop_cpu() doesn't work because >> wait_for_completion() dequeues the task. >> >> True I suppose. Not sure I like your soluti

Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE

2016-09-12 Thread Cheng Chao
on 09/12/2016 07:03 PM, Oleg Nesterov wrote: > On 09/10, Cheng Chao wrote: >> >> @@ -126,6 +126,17 @@ int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, >> void *arg) >> cpu_stop_init_done(&done, 1); >> if (!cpu_stop_queue_work(cpu, &

Re: [PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE

2016-09-10 Thread Cheng Chao
hi Peter, I guess you can receive the mail from me now, I have changed the mailbox to gmail. Oleg has already done much work for this patch, I am really obliged. please review this patch, thanks. on 09/10/2016 04:52 PM, Cheng Chao wrote: > For CONFIG_PREEMPT_NONE=y, when sched_exec() ne

[PATCH v3] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE

2016-09-10 Thread Cheng Chao
task TASK_RUNNING instead of TASK_UNINTERRUPTIBLE, so the migration_cpu_stop() can do useful works. Signed-off-by: Cheng Chao --- kernel/stop_machine.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index 4a1ca5f..41aea5e 100644 --- a/ke

[PATCH v2] stop_machine: Make migration_cpu_stop() does useful works for CONFIG_PREEMPT_NONE

2016-09-09 Thread Cheng Chao
task TASK_RUNNING instead of TASK_UNINTERRUPTIBLE, so the migration_cpu_stop() can do useful works. Signed-off-by: Cheng Chao --- kernel/stop_machine.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index 4a1ca5f..41aea5e 100644 --- a/ke

[PATCH] sched/core: remove unnecessary codes of sched_init

2016-09-05 Thread cheng chao
init_idle() is called immediately after current->sched_class = &fair_sched_class; and init_idle() sets current->sched_class = &idle_sched_class. Signed-off-by: cheng chao --- kernel/sched/core.c | 5 - 1 file changed, 5 deletions(-) diff --git a/kernel/sched/core.c b/kerne

[PATCH] sched/core: simpler function for sched_exec migration

2016-09-04 Thread cheng chao
more further it makes more simpler for CONFIG_PREEMPT=y or CONFIG_PREEMPT_VOLUNTARY=y when sched_exec needs migration. Signed-off-by: cheng chao --- include/linux/stop_machine.h | 1 + kernel/sched/core.c | 2 +- kernel/stop_machine.c| 21 + 3 files changed

[PATCH] Subject: [PATCH] SCHEDULER: remove unnecessary code of sched_init()

2016-08-30 Thread cheng chao
init_idle will set current->sched_class = &idle_sched_class Signed-off-by: cheng chao --- kernel/sched/core.c | 5 - 1 file changed, 5 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 556cb07..2f7c08d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched