Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1557320
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] doc: add note on usleep_range range |
| Date | 2017-01-12 11:40 +0100 |
| Message-ID | <sYKXw-2QD-45@gated-at.bofh.it> (permalink) |
| References | <sNMpY-4BD-7@gated-at.bofh.it> <sT7WO-7AB-23@gated-at.bofh.it> <sX5a1-4AN-3@gated-at.bofh.it> <sYc9r-6qU-19@gated-at.bofh.it> <sYmVb-4JW-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Wed 2017-01-11 08:50:07, Nicholas Mc Guire wrote: > On Tue, Jan 10, 2017 at 10:25:29PM +0100, Pavel Machek wrote: > > Hi! > > > > > > "to have zero jitter" at least. I believe it is "does not". > > > > > > > > I don't see how atomic vs. non-atomic context makes difference. There > > > > are sources of jitter that affect atomic context... > > > > > > The relevance is that while there is jitter in atomic context it can > > > be quite small (depending on your hardware and the specifics of system > > > config) but in non-atomic context the jitter is so large that it > > > makes no relevant difference if you give usleep_range slack of a few > > > microseconds. > > > > I disagree here. Even in non-atomic code, you'll get _no_ jitter most > > of the time. If you care about average case, small slack may still > > make sense. > > yes - thats what the results say - the mean does not differe significantly > so if you care about average case - it makes no difference. You did not demonstrate that. > > > usleep_range() 5000 samples - idle system > > > 100,100 200,200 190,200 > > > Min. :188481 Min. :201917 Min. :197793 > > > 1st Qu.:207062 1st Qu.:207057 1st Qu.:207051 > > > Median :207139 Median :207133 Median :207133 > > > Mean :207254 Mean :207233 Mean :207244 > > > 3rd Qu.:207341 erd Qu.:207262 3rd Qu.:207610 > > > Max. :225340 Max. :214222 Max. :214885 > > > > > > 100,200 to 200,200 is maybe relevant impact for > > > some systems with respect to the outliers, but > > > mean and median are almost the same, for > > > 190,200 to 200,200 there is statistically no > > > significant difference with respect to performance > > > Note that the timestamp before and after also has > > > jitter - so only part of the jitter can be attributed > > > to usleep_range() it self. But idle system optimization > > > is not that interesting for most systems. > > > > I disagree here. Most of systems are idle, most of the time. You say > > that basically everyone should provide 50 usec of slack... So I guess > > I'd like to see comparisons for 200,200 and 200,250 (and perhaps also > > 200,500 or something). > > > I did not say that everyone should use 50us of slack - rather the statement > was "makes no relevant difference if you give usleep_range slack of a few > microseconds." and that min==max makes *no* sense and that providing > even just small slack (in 10s of us range) makes a relevant difference > at system level. You did not demonstrate any "relevant difference at system level". Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH] doc: add note on usleep_range range Nicholas Mc Guire <der.herr@hofr.at> - 2017-01-07 20:50 +0100
Re: [PATCH] doc: add note on usleep_range range Pavel Machek <pavel@ucw.cz> - 2017-01-10 22:30 +0100
Re: [PATCH] doc: add note on usleep_range range Nicholas Mc Guire <der.herr@hofr.at> - 2017-01-11 10:00 +0100
Re: [PATCH] doc: add note on usleep_range range Pavel Machek <pavel@ucw.cz> - 2017-01-12 11:40 +0100
csiph-web