[tip:smp/hotplug] cpu/hotplug: Handle unbalanced hotplug enable/disable

2016-09-02 Thread tip-bot for Lianwei Wang
Commit-ID: 01b41159066531cc8d664362ff0cd89dd137bbfa Gitweb: http://git.kernel.org/tip/01b41159066531cc8d664362ff0cd89dd137bbfa Author: Lianwei Wang AuthorDate: Thu, 9 Jun 2016 23:43:28 -0700 Committer: Thomas Gleixner CommitDate: Fri, 2 Sep 2016 20:37:17 +0200 cpu/hotplug: Handle

Re: [PATCH v3] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-06-20 Thread Lianwei Wang
On Thu, Jun 9, 2016 at 11:43 PM, Lianwei Wang wrote: > Currently it just print a warning message but did not > reset cpu_hotplug_disabled when the enable/disable is > unbalanced. The unbalanced enable/disable will lead > the cpu hotplug work abnormally. > > Do nothing if an

[PATCH v2] PM / sleep: make pm notifier called symmetrically

2016-06-19 Thread Lianwei Wang
This makes pm notifier PREPARE/POST symmetrical: if PREPARE fails, we will only undo what ever happened on PREPARE. It fixes the unbalanced cpu hotplug enable in cpu pm notifier. Signed-off-by: Lianwei Wang --- kernel/power/hibernate.c | 20 kernel/power/main.c | 11

Re: [PATCH v1] PM / sleep: make pm notifier called symmetrically

2016-06-10 Thread Lianwei Wang
On Fri, Jun 10, 2016 at 7:00 AM, Rafael J. Wysocki wrote: > On Thursday, June 09, 2016 11:47:32 PM Lianwei Wang wrote: >> This makes pm notifier PREPARE/POST symmetrical: if PREPARE >> fails, we will only undo what ever happened on PREPARE. >> >> It fixes the unbalance

[PATCH v1] PM / sleep: make pm notifier called symmetrically

2016-06-09 Thread Lianwei Wang
This makes pm notifier PREPARE/POST symmetrical: if PREPARE fails, we will only undo what ever happened on PREPARE. It fixes the unbalanced cpu hotplug enable in cpu pm notifier. Signed-off-by: Lianwei Wang --- kernel/power/hibernate.c | 20 kernel/power/main.c | 11

[PATCH v3] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-06-09 Thread Lianwei Wang
Currently it just print a warning message but did not reset cpu_hotplug_disabled when the enable/disable is unbalanced. The unbalanced enable/disable will lead the cpu hotplug work abnormally. Do nothing if an unablanced hotplug enable detected. Signed-off-by: Lianwei Wang --- kernel/cpu.c

Re: [PATCH v2] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-06-08 Thread Lianwei Wang
On Mon, Jun 6, 2016 at 11:34 PM, Thomas Gleixner wrote: > On Mon, 6 Jun 2016, Lianwei Wang wrote: >> Currently it just print a warning message but did not >> reset cpu_hotplug_disabled when the enable/disable is >> unbalanced. The unbalanced enable/disable will lead &g

[PATCH v2] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-06-06 Thread Lianwei Wang
Currently it just print a warning message but did not reset cpu_hotplug_disabled when the enable/disable is unbalanced. The unbalanced enable/disable will lead the cpu hotplug work abnormally. Do nothing if an unablanced hotplug enable detected. Signed-off-by: Lianwei Wang --- kernel/cpu.c

Re: [PATCH v1] PM / sleep: make pm notifier called symmetrically

2016-06-06 Thread Lianwei Wang
On Wed, May 18, 2016 at 11:06 PM, Lianwei Wang wrote: > On Wed, May 18, 2016 at 1:34 PM, Rafael J. Wysocki wrote: >> On Wed, May 18, 2016 at 8:07 AM, Lianwei Wang wrote: >>> This makes pm notifier PREPARE/POST symmetrical: if PREPARE >>> fails, we will only undo wh

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-06-06 Thread Lianwei Wang
On Thu, May 12, 2016 at 1:06 AM, Lianwei Wang wrote: > I have come up a patch to make the pm notifier called symmetrically > and currently being tested. I will send it out after pass the test. > > On Fri, May 6, 2016 at 12:18 AM, Thomas Gleixner wrote: >> On Fri, 6 May 2016,

Re: [PATCH v1] PM / sleep: make pm notifier called symmetrically

2016-05-18 Thread Lianwei Wang
On Wed, May 18, 2016 at 1:34 PM, Rafael J. Wysocki wrote: > On Wed, May 18, 2016 at 8:07 AM, Lianwei Wang wrote: >> This makes pm notifier PREPARE/POST symmetrical: if PREPARE >> fails, we will only undo what ever happened on PREPARE. >> >> It fixes the unbalanced c

[PATCH v1] PM / sleep: make pm notifier called symmetrically

2016-05-17 Thread Lianwei Wang
This makes pm notifier PREPARE/POST symmetrical: if PREPARE fails, we will only undo what ever happened on PREPARE. It fixes the unbalanced cpu hotplug enable in cpu pm notifier. Signed-off-by: Lianwei Wang --- kernel/power/hibernate.c | 20 kernel/power/main.c | 11

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-05-12 Thread Lianwei Wang
I have come up a patch to make the pm notifier called symmetrically and currently being tested. I will send it out after pass the test. On Fri, May 6, 2016 at 12:18 AM, Thomas Gleixner wrote: > On Fri, 6 May 2016, Lianwei Wang wrote: >> On Thu, May 5, 2016 at 5:13 AM, Thomas Gleixn

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-05-06 Thread Lianwei Wang
On Thu, May 5, 2016 at 5:13 AM, Thomas Gleixner wrote: > On Wed, 4 May 2016, Lianwei Wang wrote: >> In this example, the unbalanced count is caused by the >> cpu_hotplug_pm_callback pm notifier callback function. > > I doubt that. > >> We can add a variable t

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-05-04 Thread Lianwei Wang
On Mon, May 2, 2016 at 1:11 AM, Thomas Gleixner wrote: > On Fri, 29 Apr 2016, Lianwei Wang wrote: >> On Thu, Apr 28, 2016 at 5:44 PM, Thomas Gleixner wrote: >> > Wrong. This is the symptom. The root cause is in #1. Therefor you are >> > trying >> > to fi

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-04-29 Thread Lianwei Wang
On Thu, Apr 28, 2016 at 5:44 PM, Thomas Gleixner wrote: > On Thu, 28 Apr 2016, Lianwei Wang wrote: >> On Wed, Apr 27, 2016 at 11:15 PM, Thomas Gleixner wrote: >> > On Wed, 27 Apr 2016, Lianwei Wang wrote: >> >> Yes. In our project, there is a kernel driver which re

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-04-28 Thread Lianwei Wang
On Wed, Apr 27, 2016 at 11:15 PM, Thomas Gleixner wrote: > On Wed, 27 Apr 2016, Lianwei Wang wrote: >> Yes. In our project, there is a kernel driver which register a pm >> notifier. On some conditions this pm notifier will return an error and >> abort the suspend process

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-04-27 Thread Lianwei Wang
On Wed, Apr 27, 2016 at 3:17 AM, Thomas Gleixner wrote: > On Mon, 25 Apr 2016, Lianwei Wang wrote: >> On Mon, Apr 25, 2016 at 1:22 AM, Thomas Gleixner wrote: >> >> Anyway, from a product perspective way, if we don't want to restore >> >> the unbalanced cou

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-04-26 Thread Lianwei Wang
On Mon, Apr 25, 2016 at 1:22 AM, Thomas Gleixner wrote: > On Fri, 22 Apr 2016, Lianwei Wang wrote: >> Any way is Ok for debugging purpose. But think the kernel run on a >> customer machine, such as PC, Mobile phone or other devices. How we >> let the customer debug it but n

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-04-22 Thread Lianwei Wang
On Fri, Apr 22, 2016 at 9:37 AM, Thomas Gleixner wrote: > On Fri, 22 Apr 2016, Lianwei Wang wrote: > >> On Thu, Apr 21, 2016 at 3:50 AM, Peter Zijlstra wrote: >> > On Wed, Apr 20, 2016 at 09:56:07PM -0700, Lianwei Wang wrote: >> >> Currently it just pr

Re: [PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-04-22 Thread Lianwei Wang
On Thu, Apr 21, 2016 at 3:50 AM, Peter Zijlstra wrote: > On Wed, Apr 20, 2016 at 09:56:07PM -0700, Lianwei Wang wrote: >> Currently it just print a warning message but did not >> reset cpu_hotplug_disabled when the enable/disable is >> unbalanced. The unbalanced enable/dis

[PATCH] cpu/hotplug: handle unbalanced hotplug enable/disable

2016-04-20 Thread Lianwei Wang
Currently it just print a warning message but did not reset cpu_hotplug_disabled when the enable/disable is unbalanced. The unbalanced enable/disable will lead the cpu hotplug work abnormally. Reset it to 0 when an unablanced enable detected. Signed-off-by: Lianwei Wang --- kernel/cpu.c | 21

Re: [PATCH RESEND] smp: make wake up idle cpus more generic

2016-04-03 Thread Lianwei Wang
On Sat, Apr 2, 2016 at 6:10 AM, Daniel Lezcano wrote: > On 04/02/2016 08:15 AM, Lianwei Wang wrote: >>> >>> >>> * Lianwei Wang wrote: >>> >>>> The wake_up_all_idle_cpus API always wake up all the online >>>> cpus, but sometimes we

Re: [PATCH RESEND] smp: make wake up idle cpus more generic

2016-04-01 Thread Lianwei Wang
> > * Lianwei Wang wrote: > >> The wake_up_all_idle_cpus API always wake up all the online >> cpus, but sometimes we only want to wake up a set of cpus. >> Use a generic function to wake up a group of cpus that is >> specified by the cpumask parameter. This generi

[PATCH RESEND] smp: make wake up idle cpus more generic

2016-03-31 Thread Lianwei Wang
. Signed-off-by: Lianwei Wang --- drivers/cpuidle/cpuidle.c | 4 ++-- include/linux/smp.h | 4 ++-- kernel/power/suspend.c| 2 +- kernel/smp.c | 12 +++- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle

Re: [PATCH] smp: make wake up idle cpus more generic

2016-03-31 Thread Lianwei Wang
atch is applied to the wrong git tree, please drop us a note to > help improving the system] > > url: > https://github.com/0day-ci/linux/commits/Lianwei-Wang/smp-make-wake-up-idle-cpus-more-generic/20160331-155548 > base: https://git.kernel.org/pub/scm/linux/kernel/git/raf

[PATCH] smp: make wake up idle cpus more generic

2016-03-31 Thread Lianwei Wang
. Signed-off-by: Lianwei Wang --- drivers/cpuidle/cpuidle.c | 4 ++-- include/linux/smp.h | 4 ++-- kernel/power/suspend.c| 2 +- kernel/smp.c | 12 +++- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle

Re: [PATCH] sched: idle: move need_resched check after function rcu_idle_enter

2015-11-23 Thread Lianwei Wang
On Mon, Nov 23, 2015 at 9:57 AM, Peter Zijlstra wrote: > On Mon, Nov 23, 2015 at 09:42:06AM -0800, Lianwei Wang wrote: >> Issue was found on ARM/Qcom platform, but I think it is applicable to >> other platforms as well. I add a BUG_ON after rcu_enter_idle to catch >> i

Re: [PATCH] sched: idle: move need_resched check after function rcu_idle_enter

2015-11-23 Thread Lianwei Wang
:02:02AM -0800, Lianwei Wang wrote: >> The rcu_idle_endter may call wakeup_softirqd to set the need resched >> flag on idle process. But if we don't check it after that, then the >> cpu will enter idle state with RESCHED flag set and can not be woken >> up by wakeup/resch

[PATCH] sched: idle: move need_resched check after function rcu_idle_enter

2015-11-21 Thread Lianwei Wang
e the cpu is able to be out of idle immediatley to run other tasks. Signed-off-by: Lianwei Wang --- kernel/sched/idle.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 4a2ef5a02fd3..6e96a1f41041 100644 --- a/k

Re: [linux-pm] [PATCH] cpuidle: don't wakeup processor when set a longer latency

2013-05-13 Thread Lianwei Wang
+ return NOTIFY_OK; } 2013/5/13 Lianwei Wang : > Thank you. Patch is updated. > > From 2d0b4afb5461847dcdf08a87b02015d061b12e85 Mon Sep 17 00:00:00 2001 > From: Lianwei Wang > Date: Fri, 26 Apr 2013 10:59:24 +0800 > Subject: [PATCH] cpuidle: wakeup processor on a smaller lat

Re: [linux-pm] [PATCH] cpuidle: don't wakeup processor when set a longer latency

2013-05-12 Thread Lianwei Wang
Thank you. Patch is updated. >From 2d0b4afb5461847dcdf08a87b02015d061b12e85 Mon Sep 17 00:00:00 2001 From: Lianwei Wang Date: Fri, 26 Apr 2013 10:59:24 +0800 Subject: [PATCH] cpuidle: wakeup processor on a smaller latency Checking the PM-Qos latency and cpu idle sleep latency, and only wak

Re: [linux-pm] [PATCH] cpuidle: don't wakeup processor when set a longer latency

2013-05-09 Thread Lianwei Wang
long)l < (long)s) { + smp_call_function_single(cpu, smp_callback, NULL, 1); + } + } + return NOTIFY_OK; } Thanks, Lianwei 2013/5/8 Daniel Lezcano : > On 05/08/2013 04:44 AM, Lianwei Wang wrote: >> When a PM-Qos is updated, the cpuidle dri

[PATCH] cpuidle: don't wakeup processor when set a longer latency

2013-05-07 Thread Lianwei Wang
When a PM-Qos is updated, the cpuidle driver will wakeup all the CPUs no matter what a latency is set. But actually it only need to wakeup the CPUs when a shorter latency is set. In this way we can reduce the cpu wakeup count and save battery. So we can pass the prev_value to the notifier callback

Re: PATCH: freezer: add fake signal clearing back when thaw task

2013-03-03 Thread Lianwei Wang
b 21, 2013 at 02:19:21PM +0800, Lianwei Wang wrote: >> Hi Tejun Heo and all, >> >> The commit of "34b087e freezer: kill unused >> set_freezable_with_signal()" remove recalc_sigpending*() calls in >> freezer, so the user tasks get TIF_SIGPENDING fake signal that

PATCH: freezer: add fake signal clearing back when thaw task

2013-02-20 Thread Lianwei Wang
9166b0853 Mon Sep 17 00:00:00 2001 From: Lianwei Wang Date: Mon, 21 Jan 2013 18:21:26 +0800 Subject: [PATCH] freezer: add fake signal clearing back when thaw task The fake TIF_SIGPENDING is set during freeze userspace process, but it is not cleared when thaw tasks after below commit: 34b087e