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


Groups > linux.kernel > #1606562 > unrolled thread

Re: [PATCH] sched: write better comments for weight calculations

Started byPeter Zijlstra <peterz@infradead.org>
First post2017-03-22 15:20 +0100
Last post2017-03-22 20:30 +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: write better comments for weight calculations Peter Zijlstra <peterz@infradead.org> - 2017-03-22 15:20 +0100
    Re: [PATCH] sched: write better comments for weight calculations Joel Fernandes <joelaf@google.com> - 2017-03-22 17:30 +0100
      Re: [PATCH] sched: write better comments for weight calculations Peter Zijlstra <peterz@infradead.org> - 2017-03-22 19:00 +0100
        Re: [PATCH] sched: write better comments for weight calculations Joel Fernandes <joelaf@google.com> - 2017-03-22 20:30 +0100

#1606562 — Re: [PATCH] sched: write better comments for weight calculations

FromPeter Zijlstra <peterz@infradead.org>
Date2017-03-22 15:20 +0100
SubjectRe: [PATCH] sched: write better comments for weight calculations
Message-ID<tnPhh-3Fu-71@gated-at.bofh.it>
On Fri, Mar 10, 2017 at 12:47:43PM -0800, Joel Fernandes wrote:
> This patch rewrites comments related task priorities and CPU usage
> along with an example to show how it works.

To what purpose? Bigger word count?

[toc] | [next] | [standalone]


#1606720

FromJoel Fernandes <joelaf@google.com>
Date2017-03-22 17:30 +0100
Message-ID<tnRj3-5ko-5@gated-at.bofh.it>
In reply to#1606562
On Wed, Mar 22, 2017 at 7:18 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Fri, Mar 10, 2017 at 12:47:43PM -0800, Joel Fernandes wrote:
>> This patch rewrites comments related task priorities and CPU usage
>> along with an example to show how it works.
>
> To what purpose? Bigger word count?

The intention is to improve the comments to make it more
understandable (the weight calculations, factor of 1.25 etc).

On reading through the comments the first time, I felt they could be
improved. Is your concern more about the addition of an example
increasing the word-count? Perhaps you'd rather this be added to
Documentation/ instead?

Regards,
Joel

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


#1606848

FromPeter Zijlstra <peterz@infradead.org>
Date2017-03-22 19:00 +0100
Message-ID<tnSIa-6gL-27@gated-at.bofh.it>
In reply to#1606720
On Wed, Mar 22, 2017 at 09:25:02AM -0700, Joel Fernandes wrote:
> On Wed, Mar 22, 2017 at 7:18 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Fri, Mar 10, 2017 at 12:47:43PM -0800, Joel Fernandes wrote:
> >> This patch rewrites comments related task priorities and CPU usage
> >> along with an example to show how it works.
> >
> > To what purpose? Bigger word count?
> 
> The intention is to improve the comments to make it more
> understandable (the weight calculations, factor of 1.25 etc).
> 
> On reading through the comments the first time, I felt they could be
> improved. Is your concern more about the addition of an example
> increasing the word-count? Perhaps you'd rather this be added to
> Documentation/ instead?

It might just be verbiage; I sometimes have trouble condensing text.
That is; some people need repetition, I get stuck trying to figure out
if its saying the same or not.

In any case; if you want to clarify where the 1.25 comes from, maybe do
an abstract example, instead of an explicit one?

 -10% = .9, +10% = 1.1 -> 1.1/.9 = 1.(2) ~ 1.25

Or, starting with the weight thing:

.45 = wa / (wa+wb) -> .45 (wa+wb) = wa ->
                      .45wa + .45wb = wa ->
		      .45wb = .55wa ->
		      wb/wa = .55/.45 = 1.(2) ~ 1.25

That's actually simpler to follow no?

Now IIRC the whole thing is backwards anyway, we started with 1.25 and
got the ~10% from there.

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


#1606937

FromJoel Fernandes <joelaf@google.com>
Date2017-03-22 20:30 +0100
Message-ID<tnU7g-7qr-15@gated-at.bofh.it>
In reply to#1606848
On Wed, Mar 22, 2017 at 10:55 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Wed, Mar 22, 2017 at 09:25:02AM -0700, Joel Fernandes wrote:
>> On Wed, Mar 22, 2017 at 7:18 AM, Peter Zijlstra <peterz@infradead.org> wrote:
>> > On Fri, Mar 10, 2017 at 12:47:43PM -0800, Joel Fernandes wrote:
>> >> This patch rewrites comments related task priorities and CPU usage
>> >> along with an example to show how it works.
>> >
>> > To what purpose? Bigger word count?
>>
>> The intention is to improve the comments to make it more
>> understandable (the weight calculations, factor of 1.25 etc).
>>
>> On reading through the comments the first time, I felt they could be
>> improved. Is your concern more about the addition of an example
>> increasing the word-count? Perhaps you'd rather this be added to
>> Documentation/ instead?
>
> It might just be verbiage; I sometimes have trouble condensing text.
> That is; some people need repetition, I get stuck trying to figure out
> if its saying the same or not.
>
> In any case; if you want to clarify where the 1.25 comes from, maybe do
> an abstract example, instead of an explicit one?
>
>  -10% = .9, +10% = 1.1 -> 1.1/.9 = 1.(2) ~ 1.25
>
> Or, starting with the weight thing:
>
> .45 = wa / (wa+wb) -> .45 (wa+wb) = wa ->
>                       .45wa + .45wb = wa ->
>                       .45wb = .55wa ->
>                       wb/wa = .55/.45 = 1.(2) ~ 1.25
>
> That's actually simpler to follow no?
>
> Now IIRC the whole thing is backwards anyway, we started with 1.25 and
> got the ~10% from there.

Yes we could condense it further and explain it without using an
explicit example. I will work on a better patch along these lines.

Thanks,
Joel

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web