sched/deadline: don't need to check SD_BALANCE_FORK
PATCH 1/2 sched/deadline: don't need to 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.
--- kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/deadline.c +1 -1
@@ -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);
Signature · 1 line
1.9.1
PATCH 2/2 sched/deadline: don't need to 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.
--- kernel/sched/deadline.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/sched/deadline.c +3 -0
@@ -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;
Signature · 1 line
1.9.1
Re: [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned
Cc Juri,
Quoted 22 lines · Wanpeng Li
Use
nr_cpus_allowedto bail fromselect_task_rq()when only one cpu can be used, and saves some cycles for pinned tasks.Signed-off-by Wanpeng Li <[email protected]>--- kernel/sched/deadline.c | 3 +++ 1 file changed, 3 insertions(+)kernel/sched/deadline.c +3
-0@@ -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;
Re: [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned
Hi,
Quoted 19 lines · Wanpeng Li
Cc Juri,
Quoted 16 lines · Wanpeng Li
Use
nr_cpus_allowedto bail fromselect_task_rq()when only one cpu can be used, and saves some cycles for pinned tasks.Signed-off-by Wanpeng Li <[email protected]>--- kernel/sched/deadline.c | 3 +++ 1 file changed, 3 insertions(+)kernel/sched/deadline.c +0
-0@@ -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;
Quoted 6 lines
kernel/sched/deadline.c select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags) · line 922
Quoted 6 lines
kernel/sched/deadline.c +3
-0+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
Re: [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned
Hi Juri,
Quoted 22 lines · Juri Lelli
Hi,
Quoted 19 lines · Wanpeng Li
Cc Juri,
Quoted 16 lines · Wanpeng Li
Use
nr_cpus_allowedto bail fromselect_task_rq()when only one cpu can be used, and saves some cycles for pinned tasks.Signed-off-by Wanpeng Li <[email protected]>--- kernel/sched/deadline.c | 3 +++ 1 file changed, 3 insertions(+)kernel/sched/deadline.c +0
-0@@ -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;
Quoted 7 lines
Quoted 6 lines
kernel/sched/deadline.c select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags) · line 922
Quoted 6 lines
kernel/sched/deadline.c +3
-0+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
Quoted 5 lines
Best,
- Juri
Re: [PATCH 2/2] sched/deadline: don't need to balance during wakeup if wakee is pinned
Quoted 33 lines · Wanpeng Li
Hi Juri,
Quoted 22 lines · Juri Lelli
Hi,
Quoted 19 lines · Wanpeng Li
Cc Juri,
Quoted 16 lines · Wanpeng Li
Use
nr_cpus_allowedto bail fromselect_task_rq()when only one cpu can be used, and saves some cycles for pinned tasks.Signed-off-by Wanpeng Li <[email protected]>--- kernel/sched/deadline.c | 3 +++ 1 file changed, 3 insertions(+)kernel/sched/deadline.c +0
-0@@ -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;Quoted 7 lines
Quoted 6 lines
kernel/sched/deadline.c select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags) · line 922
Quoted 6 lines
kernel/sched/deadline.c +3
-0+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!
Quoted 1 line
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
Quoted 15 lines
https://lkml.org/lkml/2014/10/10/425
I'm afraid they are different patches.
Regards,
Wanpeng LiQuoted 5 lines
Best,
- Juri
tip-bot for Wanpeng Li
merge bot[tip:sched/core] sched/deadline: Don' t balance during wakeup if wakee is pinned
In reply to Wanpeng Lisched/deadline: Don't balance during wakeup if wakee is pinned
Commit-ID: f4e9d94a5bf60193d45f92b136e3d166be3ec8d5 Gitweb: http://git.kernel.org/tip/f4e9d94a5bf60193d45f92b136e3d166be3ec8d5 Author: Wanpeng Li <[email protected]> AuthorDate: Tue, 14 Oct 2014 10:22:40 +0800 Committer: Ingo Molnar <[email protected]> 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.
--- kernel/sched/deadline.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/sched/deadline.c +3 -0
@@ -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;
Cc Juri,
Quoted 21 lines · Wanpeng Li
There is no need to do balance during fork since
SCHED_DEADLINEtasks can't fork. This patch avoid theSD_BALANCE_FORKcheck.Signed-off-by Wanpeng Li <[email protected]>--- kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/sched/deadline.c +1
-1@@ -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);
Hi,
Quoted 19 lines · Wanpeng Li
Cc Juri,
Quoted 16 lines · Wanpeng Li
There is no need to do balance during fork since
SCHED_DEADLINEtasks can't fork. This patch avoid theSD_BALANCE_FORKcheck.Signed-off-by Wanpeng Li <[email protected]>--- kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/sched/deadline.c +0
-0@@ -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;
Quoted 5 lines
kernel/sched/deadline.c select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags) · line 920
Quoted 5 lines
kernel/sched/deadline.c +1
-1-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
tip-bot for Wanpeng Li
merge bot[tip:sched/core] sched/deadline: Don't check SD_BALANCE_FORK
In reply to Wanpeng Lisched/deadline: Don't check SD_BALANCE_FORK
Commit-ID: 1d7e974cbf2fce2683f34ff33c173fd7ef5478c7 Gitweb: http://git.kernel.org/tip/1d7e974cbf2fce2683f34ff33c173fd7ef5478c7 Author: Wanpeng Li <[email protected]> AuthorDate: Tue, 14 Oct 2014 10:22:39 +0800 Committer: Ingo Molnar <[email protected]> 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.
--- kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/deadline.c +1 -1
@@ -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);