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


Groups > linux.kernel > #1606533 > unrolled thread

Re: [PATCH] sched: fair: Improve PELT decay_load calculation comments

Started byPeter Zijlstra <peterz@infradead.org>
First post2017-03-22 15:20 +0100
Last post2017-03-22 20:20 +0100
Articles 4 — 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

  Re: [PATCH] sched: fair: Improve PELT decay_load calculation comments Peter Zijlstra <peterz@infradead.org> - 2017-03-22 15:20 +0100
    Re: [PATCH] sched: fair: Improve PELT decay_load calculation comments Joel Fernandes <joelaf@google.com> - 2017-03-22 17:40 +0100
      Re: [PATCH] sched: fair: Improve PELT decay_load calculation comments Peter Zijlstra <peterz@infradead.org> - 2017-03-22 18:10 +0100
        Re: [PATCH] sched: fair: Improve PELT decay_load calculation comments Joel Fernandes <joelaf@google.com> - 2017-03-22 20:20 +0100

#1606533 — Re: [PATCH] sched: fair: Improve PELT decay_load calculation comments

FromPeter Zijlstra <peterz@infradead.org>
Date2017-03-22 15:20 +0100
SubjectRe: [PATCH] sched: fair: Improve PELT decay_load calculation comments
Message-ID<tnPhf-3Fu-15@gated-at.bofh.it>
On Fri, Mar 10, 2017 at 12:23:41PM -0800, Joel Fernandes wrote:
> The PELT decay_load comments are a bit confusing, first of all
> the 1/2^N should be (1/2)^N so that the reader doesn't get confused.

I'm thinking you're confused. They're identical.

(1/2)^N = (2^-1)^N = 2^-N = 1/2^N

> Secondly, the y^N splitting into a 2-part decay factor deserves
> a better explanation. This patch improves the comments.

I find its actually harder to read.

[toc] | [next] | [standalone]


#1606734

FromJoel Fernandes <joelaf@google.com>
Date2017-03-22 17:40 +0100
Message-ID<tnRsK-5on-25@gated-at.bofh.it>
In reply to#1606533
On Wed, Mar 22, 2017 at 7:16 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Fri, Mar 10, 2017 at 12:23:41PM -0800, Joel Fernandes wrote:
>> The PELT decay_load comments are a bit confusing, first of all
>> the 1/2^N should be (1/2)^N so that the reader doesn't get confused.
>
> I'm thinking you're confused. They're identical.
>
> (1/2)^N = (2^-1)^N = 2^-N = 1/2^N

They are identical I know, but I meant by enclosing the 1/2 in
brackets, it is more clear that we multiply by 1/2 N times to the
first time reader - for the reason that we'd like to reduce the PELT
calculated load by 1/2 N times.

>> Secondly, the y^N splitting into a 2-part decay factor deserves
>> a better explanation. This patch improves the comments.
>
> I find its actually harder to read.

Oh, which part? Can you help improve it? Maybe I didn't word something
correctly?

Regards,
Joel

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


#1606760

FromPeter Zijlstra <peterz@infradead.org>
Date2017-03-22 18:10 +0100
Message-ID<tnRVL-5RD-7@gated-at.bofh.it>
In reply to#1606734
On Wed, Mar 22, 2017 at 09:35:43AM -0700, Joel Fernandes wrote:
> On Wed, Mar 22, 2017 at 7:16 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Fri, Mar 10, 2017 at 12:23:41PM -0800, Joel Fernandes wrote:
> >> The PELT decay_load comments are a bit confusing, first of all
> >> the 1/2^N should be (1/2)^N so that the reader doesn't get confused.
> >
> > I'm thinking you're confused. They're identical.
> >
> > (1/2)^N = (2^-1)^N = 2^-N = 1/2^N
> 
> They are identical I know, but I meant by enclosing the 1/2 in
> brackets, it is more clear that we multiply by 1/2 N times to the
> first time reader - for the reason that we'd like to reduce the PELT
> calculated load by 1/2 N times.

Must be me then, because I've never been confused about that. Esp. so
since the first part: y^p = 1/2, explicitly mentions half. So its clear
from the factorization that half is meant.

> >> Secondly, the y^N splitting into a 2-part decay factor deserves
> >> a better explanation. This patch improves the comments.
> >
> > I find its actually harder to read.
> 
> Oh, which part? Can you help improve it? Maybe I didn't word something
> correctly?

I think the fact that there's now words actually makes it worse.

The equation very concisely shows what we do. I don't see why we need
extra words there to obscure things.

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


#1606930

FromJoel Fernandes <joelaf@google.com>
Date2017-03-22 20:20 +0100
Message-ID<tnTXz-7mv-11@gated-at.bofh.it>
In reply to#1606760
Hi Peter,

On Wed, Mar 22, 2017 at 10:02 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Wed, Mar 22, 2017 at 09:35:43AM -0700, Joel Fernandes wrote:
>> On Wed, Mar 22, 2017 at 7:16 AM, Peter Zijlstra <peterz@infradead.org> wrote:
>> > On Fri, Mar 10, 2017 at 12:23:41PM -0800, Joel Fernandes wrote:
>> >> The PELT decay_load comments are a bit confusing, first of all
>> >> the 1/2^N should be (1/2)^N so that the reader doesn't get confused.
>> >
>> > I'm thinking you're confused. They're identical.
>> >
>> > (1/2)^N = (2^-1)^N = 2^-N = 1/2^N
>>
>> They are identical I know, but I meant by enclosing the 1/2 in
>> brackets, it is more clear that we multiply by 1/2 N times to the
>> first time reader - for the reason that we'd like to reduce the PELT
>> calculated load by 1/2 N times.
>
> Must be me then, because I've never been confused about that. Esp. so
> since the first part: y^p = 1/2, explicitly mentions half. So its clear
> from the factorization that half is meant.

Yes that's true.

>> >> Secondly, the y^N splitting into a 2-part decay factor deserves
>> >> a better explanation. This patch improves the comments.
>> >
>> > I find its actually harder to read.
>>
>> Oh, which part? Can you help improve it? Maybe I didn't word something
>> correctly?
>
> I think the fact that there's now words actually makes it worse.
>
> The equation very concisely shows what we do. I don't see why we need
> extra words there to obscure things.

Ok, I agree with you and will kill this patch then. Thanks for the review.

Regards,
Joel

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web