Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1637276
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Luca Abeni <luca.abeni@santannapisa.it> |
| Newsgroups | linux.kernel |
| Subject | Re: [RFC v5 8/9] sched/deadline: base GRUB reclaiming on the inactive utilization |
| Date | Mon, 08 May 2017 09:50:02 +0200 |
| Message-ID | <tELAC-10e-3@gated-at.bofh.it> (permalink) |
| References | <toh3P-72e-5@gated-at.bofh.it> <toh3P-72e-13@gated-at.bofh.it> <tpDOF-Ur-3@gated-at.bofh.it> |
| X-Mailer | Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 54 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>, Juri Lelli <juri.lelli@arm.com>, Claudio Scordino <claudio@evidence.eu.com>, Steven Rostedt <rostedt@goodmis.org>, Tommaso Cucinotta <tommaso.cucinotta@sssup.it>, Daniel Bristot de Oliveira <bristot@redhat.com>, Joel Fernandes <joelaf@google.com>, Mathieu Poirier <mathieu.poirier@linaro.org> |
| X-Original-Date | Mon, 8 May 2017 09:41:08 +0200 |
| X-Original-Message-ID | <20170508094108.384407f0@luca> |
| X-Original-References | <1490327582-4376-1-git-send-email-luca.abeni@santannapisa.it> <1490327582-4376-9-git-send-email-luca.abeni@santannapisa.it> <20170327142633.nubm5saddpitylot@hirez.programming.kicks-ass.net> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1637276 |
Show key headers only | View raw
Hi Peter,
sorry for the delay; anyway, I am working on fixing the patchset
according to the comments I received....
When working on one of your comments, I have a doubt:
On Mon, 27 Mar 2017 16:26:33 +0200
Peter Zijlstra <peterz@infradead.org> wrote:
[...]
>
>
> #define BW_SHIFT 20
> #define BW_UNIT (1 << BW_SHIFT)
>
> static inline
> u64 grub_reclaim(u64 delta, struct rq *rq, struct sched_dl_entity
> *dl_se) {
> u64 u_inact = rq->dl.this_bw - rq->dl.running_bw; /* Utot -
> Uact */ u64 u_act;
[...]
I think introducing the BW_SHIFT and BW_UNIT defines can be more useful
in a previous patch (patch 4, where I introduce the "grub_reclaim()"
function, and use ">> 20" for the first time.
Moreover, the "20" magic number is already used in core.c... Should I
introduce the defines in sched/sched.h, and change the existing core.c
code too? Is it ok to embed this change in patch 4 (sched/deadline:
implement GRUB accounting), or should it go in a separate patch?
Thanks,
Luca
>
> /*
> * What we want to write is:
> *
> * max(BW_UNIT - u_inact, dl_se->dl_bw)
> *
> * but we cannot do that since Utot can be larger than 1,
> * which means u_inact can be larger than 1, which would
> * have the above result in negative values.
> */
> if (u_inact > (BW_UNIT - dl_se->dl_bw))
> u_act = dl_se->dl_bw;
> else
> u_act = BW_UNIT - u_inact;
>
> return (delta * u_act) >> BW_SHIFT;
> }
>
> Hmm?
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [RFC v5 8/9] sched/deadline: base GRUB reclaiming on the inactive utilization Luca Abeni <luca.abeni@santannapisa.it> - 2017-05-08 09:50 +0200
Re: [RFC v5 8/9] sched/deadline: base GRUB reclaiming on the inactive utilization Peter Zijlstra <peterz@infradead.org> - 2017-05-08 10:20 +0200
Re: [RFC v5 8/9] sched/deadline: base GRUB reclaiming on the inactive utilization Luca Abeni <luca.abeni@santannapisa.it> - 2017-05-09 11:40 +0200
csiph-web