* [PATCH] sched: remove extra put_online_cpus() inside sched_setaffinity()
@ 2013-10-23 3:02 Michael wang
2013-10-25 11:48 ` Ingo Molnar
2013-10-28 2:50 ` [PATCH v2] " Michael wang
0 siblings, 2 replies; 5+ messages in thread
From: Michael wang @ 2013-10-23 3:02 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Ingo Molnar, Fengguang Wu, LKML
commit 6acce3ef84520537f8a09a12c9ddbe814a584dd2
sched: Remove get_online_cpus() usage
has left one extra put_online_cpus() inside sched_setaffinity(), remove it
to fix the WARN:
[3165] Watchdog is alive
[3159] Started watchdog thread 3165
[ 58.695502] ------------[ cut here ]------------
[ 58.697835] WARNING: CPU: 0 PID: 3166 at kernel/cpu.c:84 put_online_cpus+0x43/0x70()
[ 58.702423] Modules linked in:
[ 58.704404] CPU: 0 PID: 3166 Comm: trinity-child0 Not tainted 3.12.0-rc5-01882-gf3db366 #1172
[ 58.708530] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 58.710992] 0000000000000000 ffff88000acfbe50 ffffffff81a24643 0000000000000000
[ 58.715410] ffff88000acfbe88 ffffffff810c3e6b ffffffff810c3fef 0000000000000000
[ 58.719826] 0000000000000000 0000000000006ee0 0000000000000ffc ffff88000acfbe98
[ 58.724348] Call Trace:
[ 58.726190] [<ffffffff81a24643>] dump_stack+0x4d/0x66
[ 58.728531] [<ffffffff810c3e6b>] warn_slowpath_common+0x7f/0x98
[ 58.731069] [<ffffffff810c3fef>] ? put_online_cpus+0x43/0x70
[ 58.733664] [<ffffffff810c3f32>] warn_slowpath_null+0x1a/0x1c
[ 58.736258] [<ffffffff810c3fef>] put_online_cpus+0x43/0x70
[ 58.738686] [<ffffffff810efd59>] sched_setaffinity+0x7d/0x1f9
[ 58.741210] [<ffffffff810efce1>] ? sched_setaffinity+0x5/0x1f9
[ 58.743775] [<ffffffff81a2f724>] ? _raw_spin_unlock_irq+0x2c/0x3e
[ 58.746417] [<ffffffff810c7012>] ? do_setitimer+0x194/0x1f5
[ 58.748899] [<ffffffff810eff37>] SyS_sched_setaffinity+0x62/0x71
[ 58.751481] [<ffffffff81a373a9>] system_call_fastpath+0x16/0x1b
[ 58.754070] ---[ end trace 034818a1f6f06868 ]---
[ 58.757521] ------------[ cut here ]------------
CC: Ingo Molnar <mingo@kernel.org>
CC: Peter Zijlstra <peterz@infradead.org>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
---
kernel/sched/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c06b8d3..7c61f31 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3716,7 +3716,6 @@ long sched_setaffinity(pid_t pid, const struct cpumask *in_mask)
p = find_process_by_pid(pid);
if (!p) {
rcu_read_unlock();
- put_online_cpus();
return -ESRCH;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] sched: remove extra put_online_cpus() inside sched_setaffinity()
2013-10-23 3:02 [PATCH] sched: remove extra put_online_cpus() inside sched_setaffinity() Michael wang
@ 2013-10-25 11:48 ` Ingo Molnar
2013-10-28 2:41 ` Michael wang
2013-10-28 2:50 ` [PATCH v2] " Michael wang
1 sibling, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2013-10-25 11:48 UTC (permalink / raw)
To: Michael wang; +Cc: Peter Zijlstra, Fengguang Wu, LKML
* Michael wang <wangyun@linux.vnet.ibm.com> wrote:
> commit 6acce3ef84520537f8a09a12c9ddbe814a584dd2
> sched: Remove get_online_cpus() usage
>
> has left one extra put_online_cpus() inside sched_setaffinity(), remove it
> to fix the WARN:
>
> [3165] Watchdog is alive
> [3159] Started watchdog thread 3165
> [ 58.695502] ------------[ cut here ]------------
> [ 58.697835] WARNING: CPU: 0 PID: 3166 at kernel/cpu.c:84 put_online_cpus+0x43/0x70()
> [ 58.702423] Modules linked in:
> [ 58.704404] CPU: 0 PID: 3166 Comm: trinity-child0 Not tainted 3.12.0-rc5-01882-gf3db366 #1172
> [ 58.708530] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
> [ 58.710992] 0000000000000000 ffff88000acfbe50 ffffffff81a24643 0000000000000000
> [ 58.715410] ffff88000acfbe88 ffffffff810c3e6b ffffffff810c3fef 0000000000000000
> [ 58.719826] 0000000000000000 0000000000006ee0 0000000000000ffc ffff88000acfbe98
> [ 58.724348] Call Trace:
> [ 58.726190] [<ffffffff81a24643>] dump_stack+0x4d/0x66
> [ 58.728531] [<ffffffff810c3e6b>] warn_slowpath_common+0x7f/0x98
> [ 58.731069] [<ffffffff810c3fef>] ? put_online_cpus+0x43/0x70
> [ 58.733664] [<ffffffff810c3f32>] warn_slowpath_null+0x1a/0x1c
> [ 58.736258] [<ffffffff810c3fef>] put_online_cpus+0x43/0x70
> [ 58.738686] [<ffffffff810efd59>] sched_setaffinity+0x7d/0x1f9
> [ 58.741210] [<ffffffff810efce1>] ? sched_setaffinity+0x5/0x1f9
> [ 58.743775] [<ffffffff81a2f724>] ? _raw_spin_unlock_irq+0x2c/0x3e
> [ 58.746417] [<ffffffff810c7012>] ? do_setitimer+0x194/0x1f5
> [ 58.748899] [<ffffffff810eff37>] SyS_sched_setaffinity+0x62/0x71
> [ 58.751481] [<ffffffff81a373a9>] system_call_fastpath+0x16/0x1b
> [ 58.754070] ---[ end trace 034818a1f6f06868 ]---
> [ 58.757521] ------------[ cut here ]------------
>
> CC: Ingo Molnar <mingo@kernel.org>
> CC: Peter Zijlstra <peterz@infradead.org>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Tested-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
> ---
> kernel/sched/core.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index c06b8d3..7c61f31 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -3716,7 +3716,6 @@ long sched_setaffinity(pid_t pid, const struct cpumask *in_mask)
> p = find_process_by_pid(pid);
> if (!p) {
> rcu_read_unlock();
> - put_online_cpus();
> return -ESRCH;
> }
The patch is whitespace damaged.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sched: remove extra put_online_cpus() inside sched_setaffinity()
2013-10-25 11:48 ` Ingo Molnar
@ 2013-10-28 2:41 ` Michael wang
0 siblings, 0 replies; 5+ messages in thread
From: Michael wang @ 2013-10-28 2:41 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Peter Zijlstra, Fengguang Wu, LKML
Hi, Ingo
On 10/25/2013 07:48 PM, Ingo Molnar wrote:
[snip]
>> ---
>> kernel/sched/core.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
>> index c06b8d3..7c61f31 100644
>> --- a/kernel/sched/core.c
>> +++ b/kernel/sched/core.c
>> @@ -3716,7 +3716,6 @@ long sched_setaffinity(pid_t pid, const struct cpumask *in_mask)
>> p = find_process_by_pid(pid);
>> if (!p) {
>> rcu_read_unlock();
>> - put_online_cpus();
>> return -ESRCH;
>> }
>
> The patch is whitespace damaged.
Forgive me for the silly mistake... the line may be cursed... will
recheck and send out the right format, thanks for the notify :)
Regards,
Michael Wang
>
> Thanks,
>
> Ingo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] sched: remove extra put_online_cpus() inside sched_setaffinity()
2013-10-23 3:02 [PATCH] sched: remove extra put_online_cpus() inside sched_setaffinity() Michael wang
2013-10-25 11:48 ` Ingo Molnar
@ 2013-10-28 2:50 ` Michael wang
2013-10-28 13:33 ` [tip:sched/core] sched: Remove " tip-bot for Michael wang
1 sibling, 1 reply; 5+ messages in thread
From: Michael wang @ 2013-10-28 2:50 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Ingo Molnar, Fengguang Wu, LKML
v2:
Fix the whitespace issue.
commit 6acce3ef84520537f8a09a12c9ddbe814a584dd2
sched: Remove get_online_cpus() usage
has left one extra put_online_cpus() inside sched_setaffinity(), remove it
to fix the WARN:
[3165] Watchdog is alive
[3159] Started watchdog thread 3165
[ 58.695502] ------------[ cut here ]------------
[ 58.697835] WARNING: CPU: 0 PID: 3166 at kernel/cpu.c:84 put_online_cpus+0x43/0x70()
[ 58.702423] Modules linked in:
[ 58.704404] CPU: 0 PID: 3166 Comm: trinity-child0 Not tainted 3.12.0-rc5-01882-gf3db366 #1172
[ 58.708530] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 58.710992] 0000000000000000 ffff88000acfbe50 ffffffff81a24643 0000000000000000
[ 58.715410] ffff88000acfbe88 ffffffff810c3e6b ffffffff810c3fef 0000000000000000
[ 58.719826] 0000000000000000 0000000000006ee0 0000000000000ffc ffff88000acfbe98
[ 58.724348] Call Trace:
[ 58.726190] [<ffffffff81a24643>] dump_stack+0x4d/0x66
[ 58.728531] [<ffffffff810c3e6b>] warn_slowpath_common+0x7f/0x98
[ 58.731069] [<ffffffff810c3fef>] ? put_online_cpus+0x43/0x70
[ 58.733664] [<ffffffff810c3f32>] warn_slowpath_null+0x1a/0x1c
[ 58.736258] [<ffffffff810c3fef>] put_online_cpus+0x43/0x70
[ 58.738686] [<ffffffff810efd59>] sched_setaffinity+0x7d/0x1f9
[ 58.741210] [<ffffffff810efce1>] ? sched_setaffinity+0x5/0x1f9
[ 58.743775] [<ffffffff81a2f724>] ? _raw_spin_unlock_irq+0x2c/0x3e
[ 58.746417] [<ffffffff810c7012>] ? do_setitimer+0x194/0x1f5
[ 58.748899] [<ffffffff810eff37>] SyS_sched_setaffinity+0x62/0x71
[ 58.751481] [<ffffffff81a373a9>] system_call_fastpath+0x16/0x1b
[ 58.754070] ---[ end trace 034818a1f6f06868 ]---
[ 58.757521] ------------[ cut here ]------------
CC: Ingo Molnar <mingo@kernel.org>
CC: Peter Zijlstra <peterz@infradead.org>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
---
kernel/sched/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c06b8d3..7c61f31 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3716,7 +3716,6 @@ long sched_setaffinity(pid_t pid, const struct cpumask *in_mask)
p = find_process_by_pid(pid);
if (!p) {
rcu_read_unlock();
- put_online_cpus();
return -ESRCH;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [tip:sched/core] sched: Remove extra put_online_cpus() inside sched_setaffinity()
2013-10-28 2:50 ` [PATCH v2] " Michael wang
@ 2013-10-28 13:33 ` tip-bot for Michael wang
0 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Michael wang @ 2013-10-28 13:33 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, peterz, wangyun, tglx, fengguang.wu
Commit-ID: ac9ff7997b6f2b31949dcd2495ac671fd9ddc990
Gitweb: http://git.kernel.org/tip/ac9ff7997b6f2b31949dcd2495ac671fd9ddc990
Author: Michael wang <wangyun@linux.vnet.ibm.com>
AuthorDate: Mon, 28 Oct 2013 10:50:22 +0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 28 Oct 2013 11:36:50 +0100
sched: Remove extra put_online_cpus() inside sched_setaffinity()
Commit 6acce3ef8:
sched: Remove get_online_cpus() usage
has left one extra put_online_cpus() inside sched_setaffinity(),
remove it to fix the WARN:
------------[ cut here ]------------
WARNING: CPU: 0 PID: 3166 at kernel/cpu.c:84 put_online_cpus+0x43/0x70()
...
[<ffffffff810c3fef>] put_online_cpus+0x43/0x70 [
[<ffffffff810efd59>] sched_setaffinity+0x7d/0x1f9 [
...
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/526DD0EE.1090309@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c06b8d3..7c61f31 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3716,7 +3716,6 @@ long sched_setaffinity(pid_t pid, const struct cpumask *in_mask)
p = find_process_by_pid(pid);
if (!p) {
rcu_read_unlock();
- put_online_cpus();
return -ESRCH;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-28 13:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-23 3:02 [PATCH] sched: remove extra put_online_cpus() inside sched_setaffinity() Michael wang
2013-10-25 11:48 ` Ingo Molnar
2013-10-28 2:41 ` Michael wang
2013-10-28 2:50 ` [PATCH v2] " Michael wang
2013-10-28 13:33 ` [tip:sched/core] sched: Remove " tip-bot for Michael wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.