On Thu, Mar 24, 2022 at 1:55 AM John Ogness <john.ogness@xxxxxxxxxxxxx> wrote: > > Your system is configured to support many different governors. For > minimal latency it is important that you are using the performance > governor. The frequency scaling might be the cause of the horrible > hwlatdetect numbers you are seeing. > > If you have the cpufrequtils package installed, you can easily switch to > the performance governor with: > > cpufreq-set -g performance > > With cpufreq-info you can see a nice summary of how your CPUs are > currently set. You should see it running full speed. > > You can also configure the performance governor manually using > sysfs. You may want to read through the documentation [0] so that you > understand what you are doing. > > [0] https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html I tried both cpufreq-set -g performance and cpufreq-set -g schedutil And also set the lower and upper freq to 3.2 GHz. Overall this has not made much of a difference, I still see ~800 usec latency reports out of 'hwlatdetect'. The best run was: ... ... [Same for CPUs 0-30 ...] analyzing CPU 31: driver: intel_cpufreq CPUs which run at the same hardware frequency: 31 CPUs which need to have their frequency coordinated by software: 31 maximum transition latency: 20.0 us. hardware limits: 1.20 GHz - 3.20 GHz available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil current policy: frequency should be within 3.20 GHz and 3.20 GHz. The governor "schedutil" may decide which speed to use within this range. current CPU frequency is 1.20 GHz. node-0> sudo hwlatdetect --duration=30s hwlatdetect: test duration 30 seconds detector: tracer parameters: Latency threshold: 10us Sample window: 1000000us Sample width: 500000us Non-sampling period: 500000us Output File: None Starting test test finished Max Latency: 779us Samples recorded: 8 Samples exceeding threshold: 8 ts: 1648139049.597634649, inner:779, outer:18 ts: 1648139050.597355299, inner:16, outer:498 ts: 1648139051.347299254, inner:441, outer:0 ts: 1648139074.347304238, inner:410, outer:0 ts: 1648139075.347310909, inner:414, outer:0 ts: 1648139076.347309378, inner:0, outer:412 ts: 1648139077.347313644, inner:0, outer:415 ts: 1648139078.347315084, inner:414, outer:0 I understand my issues may be related to SMI (system management interrupt) which may cause the processor to enter the SMM (system management mode) which locks out the OS. Are their techniques to investigate (and bypass/avoid) these latency sources? > > John Ogness Many Thanks, I finally feel I am making some progress after some period of head scratching. Gautam