Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1309385 > unrolled thread

[RFC 6/8] GRUB accounting

Started byLuca Abeni <luca.abeni@unitn.it>
First post2016-01-14 16:30 +0100
Last post2016-01-15 09:10 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC 6/8] GRUB accounting Luca Abeni <luca.abeni@unitn.it> - 2016-01-14 16:30 +0100
    Re: [RFC 6/8] GRUB accounting Peter Zijlstra <peterz@infradead.org> - 2016-01-14 21:00 +0100
      Re: [RFC 6/8] GRUB accounting Luca Abeni <luca.abeni@unitn.it> - 2016-01-15 09:10 +0100

#1309385 — [RFC 6/8] GRUB accounting

FromLuca Abeni <luca.abeni@unitn.it>
Date2016-01-14 16:30 +0100
Subject[RFC 6/8] GRUB accounting
Message-ID<qQS0x-uX-1@gated-at.bofh.it>
---
 kernel/sched/deadline.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 15d3fd8..4795d7f 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -823,6 +823,11 @@ int dl_runtime_exceeded(struct sched_dl_entity *dl_se)
 
 extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
 
+u64 grub_reclaim(u64 delta, struct rq *rq, u64 u)
+{
+	return (delta * rq->dl.running_bw) >> 20;
+}
+
 /*
  * Update the current task's runtime statistics (provided it is still
  * a -deadline task and has not been removed from the dl_rq).
@@ -859,6 +864,7 @@ static void update_curr_dl(struct rq *rq)
 
 	sched_rt_avg_update(rq, delta_exec);
 
+	delta_exec = grub_reclaim(delta_exec, rq, curr->dl.dl_bw);
 	dl_se->runtime -= dl_se->dl_yielded ? 0 : delta_exec;
 	trace_sched_stat_params_dl(curr, dl_se->runtime, dl_se->deadline);
 	if (dl_runtime_exceeded(dl_se)) {
-- 
1.9.1

[toc] | [next] | [standalone]


#1309615

FromPeter Zijlstra <peterz@infradead.org>
Date2016-01-14 21:00 +0100
Message-ID<qQWdP-3jT-1@gated-at.bofh.it>
In reply to#1309385
On Thu, Jan 14, 2016 at 04:24:51PM +0100, Luca Abeni wrote:


It would be good to have a really short recap of GRUB in a comment right
about here...

> +u64 grub_reclaim(u64 delta, struct rq *rq, u64 u)
> +{
> +	return (delta * rq->dl.running_bw) >> 20;
> +}

[toc] | [prev] | [next] | [standalone]


#1309936

FromLuca Abeni <luca.abeni@unitn.it>
Date2016-01-15 09:10 +0100
Message-ID<qR7Ci-3ht-13@gated-at.bofh.it>
In reply to#1309615
On 01/14/2016 08:50 PM, Peter Zijlstra wrote:
> On Thu, Jan 14, 2016 at 04:24:51PM +0100, Luca Abeni wrote:
>
>
> It would be good to have a really short recap of GRUB in a comment right
> about here...
Ok; I'll add it


			Thanks,
				Luca

>
>> +u64 grub_reclaim(u64 delta, struct rq *rq, u64 u)
>> +{
>> +	return (delta * rq->dl.running_bw) >> 20;
>> +}

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web