[PATCH] documentation: Make sample code and documentation consistent

2016-03-07 Thread Yao Dongdong
In the chapter 'analogy with reader-writer locking', the sample code uses spinlock_t in reader-writer case. Just correct it so that we can read the document easily. Signed-off-by: Yao Dongdong <yaodongd...@huawei.com> --- Documentation/RCU/whatisRCU.txt | 22 +++---

[PATCH] documentation: Make sample code and documentation consistent

2016-03-07 Thread Yao Dongdong
In the chapter 'analogy with reader-writer locking', the sample code uses spinlock_t in reader-writer case. Just correct it so that we can read the document easily. Signed-off-by: Yao Dongdong --- Documentation/RCU/whatisRCU.txt | 22 +++--- 1 file changed, 15 insertions(+), 7

[PATCH] rcu: Remove reduplicate check of cpu_online

2015-02-25 Thread Yao Dongdong
The calling function invoke_rcu_core will check it. Signed-off-by: Yao Dongdong --- kernel/rcu/tree.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 48d640c..e5f9b7e 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c

[PATCH] rcu: Remove reduplicate check of cpu_online

2015-02-25 Thread Yao Dongdong
The calling function invoke_rcu_core will check it. Signed-off-by: Yao Dongdong yaodongd...@huawei.com --- kernel/rcu/tree.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 48d640c..e5f9b7e 100644 --- a/kernel/rcu/tree.c +++ b

[tip:sched/core] sched/core: Remove check of p->sched_class

2015-01-14 Thread tip-bot for Yao Dongdong
Commit-ID: 1b537c7d1e58c761212a193085f9049b58f672e6 Gitweb: http://git.kernel.org/tip/1b537c7d1e58c761212a193085f9049b58f672e6 Author: Yao Dongdong AuthorDate: Mon, 29 Dec 2014 14:41:43 +0800 Committer: Ingo Molnar CommitDate: Wed, 14 Jan 2015 13:34:17 +0100 sched/core: Remove check

[tip:sched/core] sched/core: Remove check of p-sched_class

2015-01-14 Thread tip-bot for Yao Dongdong
Commit-ID: 1b537c7d1e58c761212a193085f9049b58f672e6 Gitweb: http://git.kernel.org/tip/1b537c7d1e58c761212a193085f9049b58f672e6 Author: Yao Dongdong yaodongd...@huawei.com AuthorDate: Mon, 29 Dec 2014 14:41:43 +0800 Committer: Ingo Molnar mi...@kernel.org CommitDate: Wed, 14 Jan 2015 13

[PATCH] sched/core: remove check of p->sched_class

2014-12-28 Thread Yao Dongdong
Search all usage of p->sched_class in sched/core.c, no one check it before use, so it seems that every task must belong to one sched_class. Signed-off-by: Yao Dongdong --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sc

[PATCH] sched/core: remove check of p-sched_class

2014-12-28 Thread Yao Dongdong
Search all usage of p-sched_class in sched/core.c, no one check it before use, so it seems that every task must belong to one sched_class. Signed-off-by: Yao Dongdong yaodongd...@huawei.com --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched

[PATCH] selinux: Remove security_ops extern

2014-11-27 Thread Yao Dongdong
security_ops is not used in this file. Signed-off-by: Yao Dongdong --- security/selinux/hooks.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index c603b20..6da7532 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c

[PATCH] selinux: Remove security_ops extern

2014-11-27 Thread Yao Dongdong
security_ops is not used in this file. Signed-off-by: Yao Dongdong yaodongd...@huawei.com --- security/selinux/hooks.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index c603b20..6da7532 100644 --- a/security/selinux/hooks.c +++ b

[PATCH] sched, cleanup, dm bufio: Replace dm_bufio_cond_resched with might_resched

2014-11-19 Thread Yao Dongdong
The judge of need_resched() before _cond_resched() in dm_bufio_cond_resched() is no need. Because _cond_resched() itself judges should_resched() which means need and can resched. In addition, might_resched() can do all these. Signed-off-by: Yao Dongdong --- drivers/md/dm-bufio.c | 35

[PATCH] sched, cleanup, dm bufio: Replace dm_bufio_cond_resched with might_resched

2014-11-19 Thread Yao Dongdong
The judge of need_resched() before _cond_resched() in dm_bufio_cond_resched() is no need. Because _cond_resched() itself judges should_resched() which means need and can resched. In addition, might_resched() can do all these. Signed-off-by: Yao Dongdong yaodongd...@huawei.com --- drivers/md/dm

[tip:sched/core] sched: Check if we got a shallowest_idle_cpu before searching for least_loaded_cpu

2014-11-04 Thread tip-bot for Yao Dongdong
Commit-ID: 9f96742a13135e6c609cc99a3a458402af3c8f31 Gitweb: http://git.kernel.org/tip/9f96742a13135e6c609cc99a3a458402af3c8f31 Author: Yao Dongdong AuthorDate: Tue, 28 Oct 2014 04:08:06 + Committer: Ingo Molnar CommitDate: Tue, 4 Nov 2014 07:17:51 +0100 sched: Check if we got

[tip:sched/core] sched: Check if we got a shallowest_idle_cpu before searching for least_loaded_cpu

2014-11-04 Thread tip-bot for Yao Dongdong
Commit-ID: 9f96742a13135e6c609cc99a3a458402af3c8f31 Gitweb: http://git.kernel.org/tip/9f96742a13135e6c609cc99a3a458402af3c8f31 Author: Yao Dongdong yaodongd...@huawei.com AuthorDate: Tue, 28 Oct 2014 04:08:06 + Committer: Ingo Molnar mi...@kernel.org CommitDate: Tue, 4 Nov 2014 07:17

Re: [PATCH 1/2] Thermal:Fix memory leak if occur goto unregister

2014-11-03 Thread Yao Dongdong
alentin >>> Sent: Monday, October 20, 2014 6:04 PM >>> To: Yao Dongdong >>> Cc: Zhang, Rui; linux...@vger.kernel.org; LKML >>> Subject: Re: [PATCH 1/2] Thermal:Fix memory leak if occur goto unregister >>> >>> Hello, >>> >>> On Mo

Re: [PATCH 1/2] Thermal:Fix memory leak if occur goto unregister

2014-11-03 Thread Yao Dongdong
To: Yao Dongdong Cc: Zhang, Rui; linux...@vger.kernel.org; LKML Subject: Re: [PATCH 1/2] Thermal:Fix memory leak if occur goto unregister Hello, On Mon, Oct 20, 2014 at 04:27:36PM +0800, Yao Dongdong wrote: Signed-off-by:yaodongd...@huawei.com Acked-by: Eduardo Valentin edubez...@gmail.com Rui

Re: [PATCH 1/2 resend] Thermal:Fix memory leak if occur goto unregister

2014-10-28 Thread Yao Dongdong
Hello Eduardo, I'm sorry for that my patches listed below have format problems, so i resend them. https://lkml.org/lkml/2014/10/20/85 https://lkml.org/lkml/2014/10/20/84 Thanks, Yao Dongdong -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

[PATCH 1/2 resend] Thermal:Fix memory leak if occur goto unregister

2014-10-28 Thread Yao Dongdong
Signed-off-by: Yao Dongdong Acked-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 9bf10aa..d358605 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal

[PATCH 2/2 resend] Thermal:Remove usless if(!result) before return tz

2014-10-28 Thread Yao Dongdong
result is always zero when comes here. Signed-off-by: Yao Dongdong Acked-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index d358605..a438c95 100644

[PATCH 2/2 resend] Thermal:Remove usless if(!result) before return tz

2014-10-28 Thread Yao Dongdong
result is always zero when comes here. Signed-off-by: Yao Dongdong yaodongd...@huawei.com Acked-by: Eduardo Valentin edubez...@gmail.com --- drivers/thermal/thermal_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal

[PATCH 1/2 resend] Thermal:Fix memory leak if occur goto unregister

2014-10-28 Thread Yao Dongdong
Signed-off-by: Yao Dongdong yaodongd...@huawei.com Acked-by: Eduardo Valentin edubez...@gmail.com --- drivers/thermal/thermal_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 9bf10aa..d358605 100644 --- a/drivers

Re: [PATCH 1/2 resend] Thermal:Fix memory leak if occur goto unregister

2014-10-28 Thread Yao Dongdong
Hello Eduardo, I'm sorry for that my patches listed below have format problems, so i resend them. https://lkml.org/lkml/2014/10/20/85 https://lkml.org/lkml/2014/10/20/84 Thanks, Yao Dongdong -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

[PATCH resend] sched:check if got a shallowest_idle_cpu before search for least_loaded_cpu

2014-10-27 Thread Yao Dongdong
Idle cpu is idler than non-idle cpu, so we needn't search for least_loaded_cpu after we have found an idle cpu. Signed-off-by: Yao Dongdong Reviewed-by: Srikar Dronamraju --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel

Re: [PATCH v2]sched:add check of shallowest_idle_cpu before search for least_loaded_cpu

2014-10-27 Thread Yao Dongdong
lse if (shallowest_idle_cpu == -1) {$ > > WARNING: please, no spaces at the start of a line > #25: FILE: kernel/sched/fair.c:4644: > + } else if (shallowest_idle_cpu == -1) {$ > > total: 1 errors, 2 warnings, 8 lines checked > > NOTE: whitespace errors detected, you

[PATCH v2]sched:add check of shallowest_idle_cpu before search for least_loaded_cpu

2014-10-27 Thread Yao Dongdong
Idle cpu is idler than non-idle cpu, so we needn't search for least_loaded_cpu after we have found an idle cpu. Signed-off-by:yaodongd...@huawei.com Reviewed-by: Srikar Dronamraju --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c

Re: [PATCH] sched:skip loop non-idle cpus after find an idle cpu while find_idlest_cpu

2014-10-27 Thread Yao Dongdong
On 2014/10/27 16:04, Srikar Dronamraju wrote: > * Yao Dongdong [2014-10-27 11:13:17]: > >> Idle cpu is idler than non-idle cpu, so we needn't loop non-idle cpus after >> find an idle cpu. >> > While this check looks good, > I dont see how we are avoiding a loop?

Re: [PATCH] sched:skip loop non-idle cpus after find an idle cpu while find_idlest_cpu

2014-10-27 Thread Yao Dongdong
On 2014/10/27 16:04, Srikar Dronamraju wrote: * Yao Dongdong yaodongd...@huawei.com [2014-10-27 11:13:17]: Idle cpu is idler than non-idle cpu, so we needn't loop non-idle cpus after find an idle cpu. While this check looks good, I dont see how we are avoiding a loop? Are you suggesting

[PATCH v2]sched:add check of shallowest_idle_cpu before search for least_loaded_cpu

2014-10-27 Thread Yao Dongdong
Idle cpu is idler than non-idle cpu, so we needn't search for least_loaded_cpu after we have found an idle cpu. Signed-off-by:yaodongd...@huawei.com Reviewed-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v2]sched:add check of shallowest_idle_cpu before search for least_loaded_cpu

2014-10-27 Thread Yao Dongdong
if (shallowest_idle_cpu == -1) {$ total: 1 errors, 2 warnings, 8 lines checked NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or scripts/cleanfile . I 'm sorry, and i will fix and resend another one. Thanks, Yao Dongdong -- To unsubscribe from this list: send

[PATCH resend] sched:check if got a shallowest_idle_cpu before search for least_loaded_cpu

2014-10-27 Thread Yao Dongdong
Idle cpu is idler than non-idle cpu, so we needn't search for least_loaded_cpu after we have found an idle cpu. Signed-off-by: Yao Dongdong yaodongd...@huawei.com Reviewed-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] sched:skip loop non-idle cpus after find an idle cpu while find_idlest_cpu

2014-10-26 Thread Yao Dongdong
Idle cpu is idler than non-idle cpu, so we needn't loop non-idle cpus after find an idle cpu. Signed-off-by:yaodongd...@huawei.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 0b069bf..2445a23 100644

[PATCH] sched:skip loop non-idle cpus after find an idle cpu while find_idlest_cpu

2014-10-26 Thread Yao Dongdong
Idle cpu is idler than non-idle cpu, so we needn't loop non-idle cpus after find an idle cpu. Signed-off-by:yaodongd...@huawei.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 0b069bf..2445a23 100644

Re: [PATCH 2/2] Thermal:Remove usless if(!result) before return tz

2014-10-20 Thread Yao Dongdong
On 2014/10/20 20:10, Eduardo Valentin wrote: > Hello Yao > > On Mon, Oct 20, 2014 at 04:27:59PM +0800, Yao Dongdong wrote: >> result is always zero when comes here. >> >> Signed-off-by:yaodongd...@huawei.com >> >> --- >> drivers/thermal/thermal_c

[PATCH 1/2] Thermal:Fix memory leak if occur goto unregister

2014-10-20 Thread Yao Dongdong
Signed-off-by:yaodongd...@huawei.com --- drivers/thermal/thermal_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 71b0ec0..5b7d466 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@

[PATCH 2/2] Thermal:Remove usless if(!result) before return tz

2014-10-20 Thread Yao Dongdong
result is always zero when comes here. Signed-off-by:yaodongd...@huawei.com --- drivers/thermal/thermal_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 5b7d466..19cac8e 100644 ---

[PATCH 1/2] Thermal:Fix memory leak if occur goto unregister

2014-10-20 Thread Yao Dongdong
Signed-off-by:yaodongd...@huawei.com --- drivers/thermal/thermal_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 71b0ec0..5b7d466 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@

[PATCH 2/2] Thermal:Remove usless if(!result) before return tz

2014-10-20 Thread Yao Dongdong
result is always zero when comes here. Signed-off-by:yaodongd...@huawei.com --- drivers/thermal/thermal_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 5b7d466..19cac8e 100644 ---

Re: [PATCH 2/2] Thermal:Remove usless if(!result) before return tz

2014-10-20 Thread Yao Dongdong
On 2014/10/20 20:10, Eduardo Valentin wrote: Hello Yao On Mon, Oct 20, 2014 at 04:27:59PM +0800, Yao Dongdong wrote: result is always zero when comes here. Signed-off-by:yaodongd...@huawei.com --- drivers/thermal/thermal_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

Re: [PATCH v2 2/2] sched/fair: leverage the idle state info when choosing the "idlest" cpu

2014-09-18 Thread Yao Dongdong
On 2014/9/4 23:32, Nicolas Pitre wrote: > The code in find_idlest_cpu() looks for the CPU with the smallest load. > However, if multiple CPUs are idle, the first idle CPU is selected > irrespective of the depth of its idle state. > > Among the idle CPUs we should pick the one with with the

Re: [PATCH v2 2/2] sched/fair: leverage the idle state info when choosing the idlest cpu

2014-09-18 Thread Yao Dongdong
On 2014/9/4 23:32, Nicolas Pitre wrote: The code in find_idlest_cpu() looks for the CPU with the smallest load. However, if multiple CPUs are idle, the first idle CPU is selected irrespective of the depth of its idle state. Among the idle CPUs we should pick the one with with the shallowest

Re: [PATCH] Documentation/memory-barriers.txt: match table to its comment followed

2014-09-16 Thread Yao Dongdong
ep 16, 2014 at 4:51 PM, Yao Dongdong wrote: >> The table shows CPU2's sequence of events as "x = B; y = A;", but its >> comment followed >> described as "x = A; y = B;". >> >> Signed-off-by: Yao Dongdong >> --- >> Documentation/memory-b

[PATCH] Documentation/memory-barriers.txt: match table to its comment followed

2014-09-16 Thread Yao Dongdong
The table shows CPU2's sequence of events as "x = B; y = A;", but its comment followed described as "x = A; y = B;". Signed-off-by: Yao Dongdong --- Documentation/memory-barriers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/me

[PATCH] Documentation/memory-barriers.txt: match table to its comment followed

2014-09-16 Thread Yao Dongdong
The table shows CPU2's sequence of events as x = B; y = A;, but its comment followed described as x = A; y = B;. Signed-off-by: Yao Dongdong yaodongd...@huawei.com --- Documentation/memory-barriers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/memory

Re: [PATCH] Documentation/memory-barriers.txt: match table to its comment followed

2014-09-16 Thread Yao Dongdong
On 2014/9/16 17:24, Jianyu Zhan wrote: Hi, Some one has submitted a patch addressing this issue a few days ago. The patch is now being cooked in the paulk's tree now, IIRC. Thanks, Jianyu Zhan I have found the patch you mentioned. Thanks On Tue, Sep 16, 2014 at 4:51 PM, Yao Dongdong