Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1607858
| From | luca abeni <luca.abeni@santannapisa.it> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC v5 6/9] sched/deadline: make GRUB a task's flag |
| Date | 2017-03-23 21:00 +0100 |
| Message-ID | <toh3Q-72e-21@gated-at.bofh.it> (permalink) |
| References | <toh3P-72e-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Luca Abeni <luca.abeni@santannapisa.it>
Signed-off-by: Luca Abeni <luca.abeni@santannapisa.it>
Tested-by: Daniel Bristot de Oliveira <bristot@redhat.com>
---
include/uapi/linux/sched.h | 1 +
kernel/sched/core.c | 3 ++-
kernel/sched/deadline.c | 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/sched.h b/include/uapi/linux/sched.h
index 5f0fe01..e2a6c7b 100644
--- a/include/uapi/linux/sched.h
+++ b/include/uapi/linux/sched.h
@@ -47,5 +47,6 @@
* For the sched_{set,get}attr() calls
*/
#define SCHED_FLAG_RESET_ON_FORK 0x01
+#define SCHED_FLAG_RECLAIM 0x02
#endif /* _UAPI_LINUX_SCHED_H */
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index efa88eb..88e108b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4140,7 +4140,8 @@ static int __sched_setscheduler(struct task_struct *p,
return -EINVAL;
}
- if (attr->sched_flags & ~(SCHED_FLAG_RESET_ON_FORK))
+ if (attr->sched_flags &
+ ~(SCHED_FLAG_RESET_ON_FORK | SCHED_FLAG_RECLAIM))
return -EINVAL;
/*
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index e964051..1951379 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -921,7 +921,8 @@ static void update_curr_dl(struct rq *rq)
sched_rt_avg_update(rq, delta_exec);
- delta_exec = grub_reclaim(delta_exec, rq);
+ if (unlikely(dl_se->flags & SCHED_FLAG_RECLAIM))
+ delta_exec = grub_reclaim(delta_exec, rq);
dl_se->runtime -= delta_exec;
throttle:
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC v5 0/9] CPU reclaiming for SCHED_DEADLINE luca abeni <luca.abeni@santannapisa.it> - 2017-03-23 21:00 +0100
[RFC v5 8/9] sched/deadline: base GRUB reclaiming on the inactive utilization luca abeni <luca.abeni@santannapisa.it> - 2017-03-23 21:00 +0100
Re: [RFC v5 8/9] sched/deadline: base GRUB reclaiming on the inactive utilization Peter Zijlstra <peterz@infradead.org> - 2017-03-27 16:30 +0200
Re: [RFC v5 8/9] sched/deadline: base GRUB reclaiming on the inactive utilization Luca Abeni <luca.abeni@santannapisa.it> - 2017-03-27 17:00 +0200
Re: [RFC v5 8/9] sched/deadline: base GRUB reclaiming on the inactive utilization Peter Zijlstra <peterz@infradead.org> - 2017-03-27 18:20 +0200
Re: [RFC v5 8/9] sched/deadline: base GRUB reclaiming on the inactive utilization luca abeni <luca.abeni@santannapisa.it> - 2017-03-27 19:10 +0200
[RFC v5 2/9] sched/deadline: improve the tracking of active utilization luca abeni <luca.abeni@santannapisa.it> - 2017-03-23 21:00 +0100
Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization Peter Zijlstra <peterz@infradead.org> - 2017-03-24 14:30 +0100
Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization Peter Zijlstra <peterz@infradead.org> - 2017-03-24 14:30 +0100
Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization luca abeni <luca.abeni@santannapisa.it> - 2017-03-24 22:50 +0100
Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization Steven Rostedt <rostedt@goodmis.org> - 2017-03-25 03:40 +0100
Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization Luca Abeni <luca.abeni@santannapisa.it> - 2017-03-27 10:30 +0200
Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization Claudio Scordino <claudio@evidence.eu.com> - 2017-03-27 11:00 +0200
Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization Juri Lelli <juri.lelli@arm.com> - 2017-03-27 09:20 +0200
Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization Luca Abeni <luca.abeni@santannapisa.it> - 2017-03-27 10:10 +0200
Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization Juri Lelli <juri.lelli@arm.com> - 2017-03-27 10:50 +0200
Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization Luca Abeni <luca.abeni@santannapisa.it> - 2017-03-27 09:40 +0200
Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-03-26 19:40 +0200
Re: [RFC v5 2/9] sched/deadline: improve the tracking of active utilization luca abeni <luca.abeni@santannapisa.it> - 2017-03-26 23:10 +0200
[RFC v5 6/9] sched/deadline: make GRUB a task's flag luca abeni <luca.abeni@santannapisa.it> - 2017-03-23 21:00 +0100
[RFC v5 7/9] sched/deadline: track the "total rq utilization" too luca abeni <luca.abeni@santannapisa.it> - 2017-03-23 21:00 +0100
[RFC v5 4/9] sched/deadline: implement GRUB accounting luca abeni <luca.abeni@santannapisa.it> - 2017-03-23 21:00 +0100
[RFC v5 3/9] sched/deadline: fix the update of the total -deadline utilization luca abeni <luca.abeni@santannapisa.it> - 2017-03-23 21:00 +0100
csiph-web