Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1253701
| From | Byungchul Park <byungchul.park@lge.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 1/2] sched: make __update_cpu_load() handle active tickless case |
| Date | 2015-10-22 12:30 +0200 |
| Message-ID | <qmlib-7Vb-27@gated-at.bofh.it> (permalink) |
| References | <qjqR3-31B-1@gated-at.bofh.it> <qjqR3-31B-3@gated-at.bofh.it> <qliw2-5t5-11@gated-at.bofh.it> <qltrt-4x1-59@gated-at.bofh.it> <qlBIm-8jI-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Oct 20, 2015 at 11:48:48AM +0200, Peter Zijlstra wrote: > On Tue, Oct 20, 2015 at 09:49:32AM +0900, Byungchul Park wrote: > > > > = A^i * cpu_load(n-i) + (A^(i-1) + A^(i-2) + ... + 1) * B > > > > , where i = pending_updates - 1 > > > > > > You missed an opportunity here, if you take i==n you avoid the need for > > > i entirely. > > > > i don't think so. as i said, _n_ is the current tick -1 and _i_ is > > pending_updates - 1. we cannot take i == n, but should keep (n-i). > > Just think relative; it doesn't matter when in time we do this. > So 0 to n is identical to any other interval. You are right. I'm always tired these days. I was confused. Sorry for that. > > > > > = A^i * cpu_load(n-i) + B * (A^i - 1) / (A - 1) > > > > , by geometric series formula for sum > > > > > > That's wrong; the limited geometric series expands to: > > > > NO, that's not wrong. it doesn't matter at all. > > > > a * (1 - r^n) / (1 - r) > > = a * (-1)(r^n - 1) / (-1)(r - 1) > > = a * (r^n - 1) / (r - 1) > > > > i mean these two are exactly same. > > Ah indeed! Sorry for that. I clearly didn't think beyond the series > expansion I found. > > > > I've rewritten the things a little; does this look good to you? > > > > however, your expressions and descriptions below look better than me, > > except some logical errors. could you keep my logical flow unchagned? > > > > + * load[i]_n = (1 - 1/2^i) * load[i]_n-1 + (1/2^i) * load_n-1 > > > + * = A * load[i]_n-1 + B ; A := (1 - 1/2^i), B := (1/2^i) * load > > > + * = A * (A * load[i]_n-2 + B) + B > > > + * = A * (A * (A * load[i]_n-3 + B) + B) + B > > > + * = A^3 * load[i]_n-3 + (A^2 + A + 1) * B > > > + * = A^n * load[i]_0 + (A^(n-1) + A^(n-2) + ... + 1) * B > > > + * = A^n * load[i]_0 + ((1 - A^n) / (1 - A)) * B > > > + * = (1 - 1/2^i)^n * (load[i]_0 - load) + load > > That is the same logic, right? Yes, absolutely same logic. Thanks a lot, byungchul > > Please be more specific as to what you'd like restored. > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v4 1/2] sched: make __update_cpu_load() handle active tickless case Peter Zijlstra <peterz@infradead.org> - 2015-10-19 15:20 +0200
Re: [PATCH v4 1/2] sched: make __update_cpu_load() handle active tickless case Byungchul Park <byungchul.park@lge.com> - 2015-10-20 03:00 +0200
Re: [PATCH v4 1/2] sched: make __update_cpu_load() handle active tickless case Peter Zijlstra <peterz@infradead.org> - 2015-10-20 11:50 +0200
Re: [PATCH v4 1/2] sched: make __update_cpu_load() handle active tickless case Byungchul Park <byungchul.park@lge.com> - 2015-10-22 12:30 +0200
Re: [PATCH v4 1/2] sched: make __update_cpu_load() handle active tickless case Peter Zijlstra <peterz@infradead.org> - 2015-10-22 13:10 +0200
csiph-web