All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] sched/deadline: don't need to check SD_BALANCE_FORK
@ 2014-10-14  2:22 Wanpeng Li
  2014-10-14  2:22 ` [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned Wanpeng Li
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Wanpeng Li @ 2014-10-14  2:22 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra; +Cc: linux-kernel, Wanpeng Li

There is no need to do balance during fork since SCHED_DEADLINE 
tasks can't fork. This patch avoid the SD_BALANCE_FORK check.

Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
---
 kernel/sched/deadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index abfaf3d..f46b7f1 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -914,7 +914,7 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags)
 	struct task_struct *curr;
 	struct rq *rq;
 
-	if (sd_flag != SD_BALANCE_WAKE && sd_flag != SD_BALANCE_FORK)
+	if (sd_flag != SD_BALANCE_WAKE)
 		goto out;
 
 	rq = cpu_rq(cpu);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned
  2014-10-14  2:22 [PATCH 1/2] sched/deadline: don't need to check SD_BALANCE_FORK Wanpeng Li
@ 2014-10-14  2:22 ` Wanpeng Li
  2014-10-21 12:19   ` Wanpeng Li
  2014-10-28 11:07   ` [tip:sched/core] sched/deadline: Don' t " tip-bot for Wanpeng Li
  2014-10-21 12:18 ` [PATCH 1/2] sched/deadline: don't need to check SD_BALANCE_FORK Wanpeng Li
  2014-10-28 11:07 ` [tip:sched/core] sched/deadline: Don't " tip-bot for Wanpeng Li
  2 siblings, 2 replies; 10+ messages in thread
From: Wanpeng Li @ 2014-10-14  2:22 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra; +Cc: linux-kernel, Wanpeng Li

Use nr_cpus_allowed to bail from select_task_rq() when only one cpu 
can be used, and saves some cycles for pinned tasks.

Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
---
 kernel/sched/deadline.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index f46b7f1..5874bf8 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -914,6 +914,9 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags)
 	struct task_struct *curr;
 	struct rq *rq;
 
+	if (p->nr_cpus_allowed == 1)
+		goto out;
+
 	if (sd_flag != SD_BALANCE_WAKE)
 		goto out;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] sched/deadline: don't need to check SD_BALANCE_FORK
  2014-10-14  2:22 [PATCH 1/2] sched/deadline: don't need to check SD_BALANCE_FORK Wanpeng Li
  2014-10-14  2:22 ` [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned Wanpeng Li
@ 2014-10-21 12:18 ` Wanpeng Li
  2014-10-21 13:38   ` Juri Lelli
  2014-10-28 11:07 ` [tip:sched/core] sched/deadline: Don't " tip-bot for Wanpeng Li
  2 siblings, 1 reply; 10+ messages in thread
From: Wanpeng Li @ 2014-10-21 12:18 UTC (permalink / raw)
  To: Wanpeng Li, Ingo Molnar, Peter Zijlstra; +Cc: linux-kernel, Juri Lelli

Cc Juri,

于 10/14/14, 10:22 AM, Wanpeng Li 写道:
> There is no need to do balance during fork since SCHED_DEADLINE 
> tasks can't fork. This patch avoid the SD_BALANCE_FORK check.
>
> Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
> ---
>  kernel/sched/deadline.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index abfaf3d..f46b7f1 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -914,7 +914,7 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags)
>  	struct task_struct *curr;
>  	struct rq *rq;
>  
> -	if (sd_flag != SD_BALANCE_WAKE && sd_flag != SD_BALANCE_FORK)
> +	if (sd_flag != SD_BALANCE_WAKE)
>  		goto out;
>  
>  	rq = cpu_rq(cpu);


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned
  2014-10-14  2:22 ` [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned Wanpeng Li
@ 2014-10-21 12:19   ` Wanpeng Li
  2014-10-21 13:29     ` Juri Lelli
  2014-10-28 11:07   ` [tip:sched/core] sched/deadline: Don' t " tip-bot for Wanpeng Li
  1 sibling, 1 reply; 10+ messages in thread
From: Wanpeng Li @ 2014-10-21 12:19 UTC (permalink / raw)
  To: Wanpeng Li, Ingo Molnar, Peter Zijlstra; +Cc: linux-kernel, Juri Lelli

Cc Juri,

于 10/14/14, 10:22 AM, Wanpeng Li 写道:
> Use nr_cpus_allowed to bail from select_task_rq() when only one cpu 
> can be used, and saves some cycles for pinned tasks.
>
> Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
> ---
>  kernel/sched/deadline.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index f46b7f1..5874bf8 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -914,6 +914,9 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags)
>  	struct task_struct *curr;
>  	struct rq *rq;
>  
> +	if (p->nr_cpus_allowed == 1)
> +		goto out;
> +
>  	if (sd_flag != SD_BALANCE_WAKE)
>  		goto out;
>  


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned
  2014-10-21 12:19   ` Wanpeng Li
@ 2014-10-21 13:29     ` Juri Lelli
  2014-10-21 13:39       ` Wanpeng Li
  0 siblings, 1 reply; 10+ messages in thread
From: Juri Lelli @ 2014-10-21 13:29 UTC (permalink / raw)
  To: Wanpeng Li, Wanpeng Li, Ingo Molnar, Peter Zijlstra
  Cc: linux-kernel@vger.kernel.org

Hi,

On 21/10/14 13:19, Wanpeng Li wrote:
> Cc Juri,
> 
> 于 10/14/14, 10:22 AM, Wanpeng Li 写道:
>> Use nr_cpus_allowed to bail from select_task_rq() when only one cpu 
>> can be used, and saves some cycles for pinned tasks.
>>
>> Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
>> ---
>>  kernel/sched/deadline.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
>> index f46b7f1..5874bf8 100644
>> --- a/kernel/sched/deadline.c
>> +++ b/kernel/sched/deadline.c
>> @@ -914,6 +914,9 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags)
>>  	struct task_struct *curr;
>>  	struct rq *rq;
>>  
>> +	if (p->nr_cpus_allowed == 1)
>> +		goto out;
>> +
>>  	if (sd_flag != SD_BALANCE_WAKE)
>>  		goto out;
>> 

Apart from the encoding of the resend, it looks good, thanks!

Best,

- Juri


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] sched/deadline: don't need to check SD_BALANCE_FORK
  2014-10-21 12:18 ` [PATCH 1/2] sched/deadline: don't need to check SD_BALANCE_FORK Wanpeng Li
@ 2014-10-21 13:38   ` Juri Lelli
  0 siblings, 0 replies; 10+ messages in thread
From: Juri Lelli @ 2014-10-21 13:38 UTC (permalink / raw)
  To: Wanpeng Li, Wanpeng Li, Ingo Molnar, Peter Zijlstra
  Cc: linux-kernel@vger.kernel.org

Hi,

On 21/10/14 13:18, Wanpeng Li wrote:
> Cc Juri,
> 
> 于 10/14/14, 10:22 AM, Wanpeng Li 写道:
>> There is no need to do balance during fork since SCHED_DEADLINE 
>> tasks can't fork. This patch avoid the SD_BALANCE_FORK check.
>>
>> Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
>> ---
>>  kernel/sched/deadline.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
>> index abfaf3d..f46b7f1 100644
>> --- a/kernel/sched/deadline.c
>> +++ b/kernel/sched/deadline.c
>> @@ -914,7 +914,7 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags)
>>  	struct task_struct *curr;
>>  	struct rq *rq;
>>  
>> -	if (sd_flag != SD_BALANCE_WAKE && sd_flag != SD_BALANCE_FORK)
>> +	if (sd_flag != SD_BALANCE_WAKE)
>>  		goto out;
>>  
>>  	rq = cpu_rq(cpu);

Yes, makes sense.

Thanks,

- Juri


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned
  2014-10-21 13:29     ` Juri Lelli
@ 2014-10-21 13:39       ` Wanpeng Li
  2014-10-21 13:42         ` Juri Lelli
  0 siblings, 1 reply; 10+ messages in thread
From: Wanpeng Li @ 2014-10-21 13:39 UTC (permalink / raw)
  To: Juri Lelli, Wanpeng Li, Ingo Molnar, Peter Zijlstra
  Cc: linux-kernel@vger.kernel.org

Hi Juri,

于 10/21/14, 9:29 PM, Juri Lelli 写道:
> Hi,
>
> On 21/10/14 13:19, Wanpeng Li wrote:
>> Cc Juri,
>>
>> 于 10/14/14, 10:22 AM, Wanpeng Li 写道:
>>> Use nr_cpus_allowed to bail from select_task_rq() when only one cpu
>>> can be used, and saves some cycles for pinned tasks.
>>>
>>> Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
>>> ---
>>>   kernel/sched/deadline.c | 3 +++
>>>   1 file changed, 3 insertions(+)
>>>
>>> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
>>> index f46b7f1..5874bf8 100644
>>> --- a/kernel/sched/deadline.c
>>> +++ b/kernel/sched/deadline.c
>>> @@ -914,6 +914,9 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags)
>>>   	struct task_struct *curr;
>>>   	struct rq *rq;
>>>   
>>> +	if (p->nr_cpus_allowed == 1)
>>> +		goto out;
>>> +
>>>   	if (sd_flag != SD_BALANCE_WAKE)
>>>   		goto out;
>>>
> Apart from the encoding of the resend, it looks good, thanks!

What's your meaning of resend? Do you mean this one?

https://lkml.org/lkml/2014/10/10/425

I'm afraid they are different patches.

Regards,
Wanpeng Li

>
> Best,
>
> - Juri
>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned
  2014-10-21 13:39       ` Wanpeng Li
@ 2014-10-21 13:42         ` Juri Lelli
  0 siblings, 0 replies; 10+ messages in thread
From: Juri Lelli @ 2014-10-21 13:42 UTC (permalink / raw)
  To: Wanpeng Li, Wanpeng Li, Ingo Molnar, Peter Zijlstra
  Cc: linux-kernel@vger.kernel.org

On 21/10/14 14:39, Wanpeng Li wrote:
> Hi Juri,
> 
> 于 10/21/14, 9:29 PM, Juri Lelli 写道:
>> Hi,
>>
>> On 21/10/14 13:19, Wanpeng Li wrote:
>>> Cc Juri,
>>>
>>> 于 10/14/14, 10:22 AM, Wanpeng Li 写道:
>>>> Use nr_cpus_allowed to bail from select_task_rq() when only one cpu
>>>> can be used, and saves some cycles for pinned tasks.
>>>>
>>>> Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
>>>> ---
>>>>   kernel/sched/deadline.c | 3 +++
>>>>   1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
>>>> index f46b7f1..5874bf8 100644
>>>> --- a/kernel/sched/deadline.c
>>>> +++ b/kernel/sched/deadline.c
>>>> @@ -914,6 +914,9 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags)
>>>>   	struct task_struct *curr;
>>>>   	struct rq *rq;
>>>>   
>>>> +	if (p->nr_cpus_allowed == 1)
>>>> +		goto out;
>>>> +
>>>>   	if (sd_flag != SD_BALANCE_WAKE)
>>>>   		goto out;
>>>>
>> Apart from the encoding of the resend, it looks good, thanks!
> 
> What's your meaning of resend? Do you mean this one?

Nope. I just meant that I received your "Cc Juri" encoded as Chinese
Simplified. But, I guess the original lkml patch looks good. Sorry for
the confusion :).

Best,

- Juri

> 
> https://lkml.org/lkml/2014/10/10/425
> 
> I'm afraid they are different patches.
> 
> Regards,
> Wanpeng Li
> 
>>
>> Best,
>>
>> - Juri
>>
> 
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [tip:sched/core] sched/deadline: Don't check SD_BALANCE_FORK
  2014-10-14  2:22 [PATCH 1/2] sched/deadline: don't need to check SD_BALANCE_FORK Wanpeng Li
  2014-10-14  2:22 ` [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned Wanpeng Li
  2014-10-21 12:18 ` [PATCH 1/2] sched/deadline: don't need to check SD_BALANCE_FORK Wanpeng Li
@ 2014-10-28 11:07 ` tip-bot for Wanpeng Li
  2 siblings, 0 replies; 10+ messages in thread
From: tip-bot for Wanpeng Li @ 2014-10-28 11:07 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: peterz, mingo, hpa, torvalds, tglx, linux-kernel, wanpeng.li

Commit-ID:  1d7e974cbf2fce2683f34ff33c173fd7ef5478c7
Gitweb:     http://git.kernel.org/tip/1d7e974cbf2fce2683f34ff33c173fd7ef5478c7
Author:     Wanpeng Li <wanpeng.li@linux.intel.com>
AuthorDate: Tue, 14 Oct 2014 10:22:39 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 28 Oct 2014 10:48:01 +0100

sched/deadline: Don't check SD_BALANCE_FORK

There is no need to do balance during fork since SCHED_DEADLINE
tasks can't fork. This patch avoid the SD_BALANCE_FORK check.

Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1413253360-5318-1-git-send-email-wanpeng.li@linux.intel.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/deadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 8aaa971..fab3bf8 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -933,7 +933,7 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags)
 	struct task_struct *curr;
 	struct rq *rq;
 
-	if (sd_flag != SD_BALANCE_WAKE && sd_flag != SD_BALANCE_FORK)
+	if (sd_flag != SD_BALANCE_WAKE)
 		goto out;
 
 	rq = cpu_rq(cpu);

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [tip:sched/core] sched/deadline: Don' t balance during wakeup if wakee is pinned
  2014-10-14  2:22 ` [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned Wanpeng Li
  2014-10-21 12:19   ` Wanpeng Li
@ 2014-10-28 11:07   ` tip-bot for Wanpeng Li
  1 sibling, 0 replies; 10+ messages in thread
From: tip-bot for Wanpeng Li @ 2014-10-28 11:07 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, peterz, tglx, wanpeng.li, mingo, hpa, torvalds

Commit-ID:  f4e9d94a5bf60193d45f92b136e3d166be3ec8d5
Gitweb:     http://git.kernel.org/tip/f4e9d94a5bf60193d45f92b136e3d166be3ec8d5
Author:     Wanpeng Li <wanpeng.li@linux.intel.com>
AuthorDate: Tue, 14 Oct 2014 10:22:40 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 28 Oct 2014 10:48:02 +0100

sched/deadline: Don't balance during wakeup if wakee is pinned

Use nr_cpus_allowed to bail from select_task_rq() when only one cpu
can be used, and saves some cycles for pinned tasks.

Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1413253360-5318-2-git-send-email-wanpeng.li@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/deadline.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index fab3bf8..2e31a30 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -933,6 +933,9 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags)
 	struct task_struct *curr;
 	struct rq *rq;
 
+	if (p->nr_cpus_allowed == 1)
+		goto out;
+
 	if (sd_flag != SD_BALANCE_WAKE)
 		goto out;
 

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-10-28 11:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-14  2:22 [PATCH 1/2] sched/deadline: don't need to check SD_BALANCE_FORK Wanpeng Li
2014-10-14  2:22 ` [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned Wanpeng Li
2014-10-21 12:19   ` Wanpeng Li
2014-10-21 13:29     ` Juri Lelli
2014-10-21 13:39       ` Wanpeng Li
2014-10-21 13:42         ` Juri Lelli
2014-10-28 11:07   ` [tip:sched/core] sched/deadline: Don' t " tip-bot for Wanpeng Li
2014-10-21 12:18 ` [PATCH 1/2] sched/deadline: don't need to check SD_BALANCE_FORK Wanpeng Li
2014-10-21 13:38   ` Juri Lelli
2014-10-28 11:07 ` [tip:sched/core] sched/deadline: Don't " tip-bot for Wanpeng Li

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.