<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 11/24/2017 6:12 AM, Chris Wilson wrote:<br>
<blockquote type="cite"
cite="mid:151153275030.23310.17279243978614545708@mail.alporthouse.com">
<pre wrap="">Quoting Michał Winiarski (2017-11-24 12:37:56)
</pre>
<blockquote type="cite">
<pre wrap="">Since we see the effects for GuC preeption, let's gather some evidence.
(SKL)
intel_guc_send_mmio latency: 100 rounds of gem_exec_latency --r '*-preemption'
drm-tip:
usecs : count distribution
0 -> 1 : 0 | |
2 -> 3 : 0 | |
4 -> 7 : 0 | |
8 -> 15 : 44 | |
16 -> 31 : 1088 | |
32 -> 63 : 832 | |
64 -> 127 : 0 | |
128 -> 255 : 0 | |
256 -> 511 : 12 | |
512 -> 1023 : 0 | |
1024 -> 2047 : 29899 |********* |
2048 -> 4095 : 131033 |****************************************|
</pre>
</blockquote>
<pre wrap="">
Such pretty graphs. Reminds me of the bpf hist output, I wonder if we
could create a tracepoint/kprobe that would output a histogram for each
waiter (filterable ofc). Benefit? Just thinking of tuning the
spin/sleep, in which case overall metrics are best
(intel_eait_for_register needs to be optimised for the typical case). I
am wondering if we could tune the spin period down to 5us, 2us? And then
have the 10us sleep.
We would also need a typical workload to run, it's profile-guided
optimisation after all. Hmm.
-Chris
</pre>
</blockquote>
<br>
It took me a while to get back to this but I've now had chance to
run with this exponential backoff scheme on the original system that
showed the problem. It was a slightly messy back port due to the
customer tree being much older than current nightly. I'm pretty sure
I got it correct though. However, I'm not sure what the
recommendation is for the two timeout values. Using the default of
'10, 10' in the patch, I still get lots of very long delays. I have
to up the Wmin value to at least 140 to get a stall free result.
Which is plausible given that the big spike in the results of any
fast version is at 110-150us. Also of note is that a Wmin between 10
and 110 actually makes things worse. Changing Wmax has no effect.<br>
<br>
In the following table, 'original' is the original driver before any
changes and 'retry loop' is the version using the first workaround
of just running the busy poll wait in a 10x loop. The other columns
are using the backoff patch with the given Wmin/Wmax values. Note
that the times are bucketed to 10us up to 500us and then in 500us
lumps thereafter. The value listed is the lower limit, i.e. there
were no times of <10us measured. Each case was run for 1000
samples.<br>
<br>
<font size="-1"><tt><tt> Time Original 10/10
50/10 100/10 110/10 130/10 140/10 RetryLoop<br>
10us: 2 2 2 2
2 2 2 2<br>
30us: 1 1
1 1 1<br>
50us: 1<br>
70us: 14 63
56 64 63 61<br>
80us: 8 41
52 44 46 41<br>
90us: 6 24
10 28 12 17<br>
100us: 2 4 20
16 17 17 22<br>
110us: 13
21 14 13 11<br>
120us: 6 366
633 636 660 650<br>
130us: 2 2 46
125 95 86 95<br>
140us: 3 2 16
18 32 46 48<br>
150us: 210 3 12
13 37 32 31<br>
160us: 322 1 18
10 14 12 17<br>
170us: 157 4 5
5 3 5 2<br>
180us: 62 11 3
1 2 1 1<br>
190us: 32 212
1 1 2<br>
200us: 27 266
1 1<br>
210us: 16
181 1<br>
220us: 16
51 1<br>
230us: 10 43 4<br>
240us: 12 22 62 1<br>
250us: 4 12 112 3<br>
260us: 3 13 73 8<br>
270us: 5 12 12
8 2<br>
280us: 4 7 12
5 1<br>
290us: 9 4<br>
300us: 1 3 9
1 1<br>
310us: 2 3 5
1 1<br>
320us: 1 4 2 3<br>
330us: 1 5 1<br>
340us: 1
2 1<br>
350us: 2 1<br>
360us: 2 1<br>
370us: 2 2<br>
380us: 1<br>
390us: 2 1 2 1<br>
410us: 1<br>
420us: 3<br>
430us: 2 2 1<br>
440us: 2 1<br>
450us: 4<br>
460us: 3 1<br>
470us: 3 1<br>
480us: 2 2<br>
490us: 1<br>
500us: 19 13 17<br>
1000us: 249 22 30 11<br>
1500us: 393 4 4 2 1<br>
2000us: 132 7 8 8
2 1 1<br>
2500us: 63 4 4 6
1 1 1<br>
3000us: 59 9 7 6 1<br>
3500us: 34 2
1 1<br>
4000us: 17 9 4 1<br>
4500us: 8 2 1 1<br>
5000us: 7 1 2<br>
5500us: 7 2 1<br>
6000us: 4 2 1 1<br>
6500us: 3 1<br>
7000us: 6 2 1<br>
7500us: 4 1 1<br>
8000us: 5 1<br>
8500us: 1 1<br>
9000us: 2<br>
9500us: 2 1<br>
>10000us: 3 1<br>
</tt></tt></font><br>
<br>
John.<br>
<br>
</body>
</html>