I tested with a Protectli FW1 router (dmesg below) forwarding packets
between two test machines. The latency spikes occur when running
headless beginning with this commit:
commit 78cd60329a9b42e2a8e91bb88c3d556b4e420e89
Author: jsg
Date: Mon Sep 9 01:35:43 2019 +
When no display outputs are connected on boot linux 4.19 drm relies
on
deferred setup to handle the console framebuffer where as linux 4.4
drm
created a 1024x768 console framebuffer in this situation.
As we only handle setting up rasops and wsdisplay on attach go back
to
the old behaviour for now so a display can be connected after
booting
with none attached to interact with the console.
This partly reverts linux commit
drm/fb-helper: Support deferred setup
ca91a2758fcef6635626993557dd51cfbb6dd134
Reported and tested by Marcus MERIGHI.
Tested by and ok kettenis@
diff --git sys/dev/pci/drm/drm_fb_helper.c
sys/dev/pci/drm/drm_fb_helper.c
index 8e134187f6c..d95b8acbebd 100644
--- sys/dev/pci/drm/drm_fb_helper.c
+++ sys/dev/pci/drm/drm_fb_helper.c
@@ -2002,15 +2002,23 @@ static int drm_fb_helper_single_fb_probe(struct
drm_fb_helper *fb_helper,
}
if (crtc_count == 0 || sizes.fb_width == -1 || sizes.fb_height
== -1) {
+#ifdef __linux__
DRM_INFO("Cannot find any crtc or sizes\n");
/* First time: disable all crtc's.. */
-#ifdef notyet
/* XXX calling this hangs boot with no connected outputs
*/
if (!fb_helper->deferred_setup /* &&
SPLAY_EMPTY(fb_helper->dev->files) */)
restore_fbdev_mode(fb_helper);
-#endif
return -EAGAIN;
+#else
+ /*
+* hmm everyone went away - assume VGA cable just fell
out
+* and will come back later.
+*/
+ DRM_INFO("Cannot find any crtc or sizes - going
1024x768\n");
+ sizes.fb_width = sizes.surface_width = 1024;
+ sizes.fb_height = sizes.surface_height = 768;
+#endif
}
/* Handle our overallocation */
Here are the test results:
OpenBSD 6.5
--- 192.168.2.100 ping statistics ---
3600 packets transmitted, 3600 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.444/0.892/2.103/0.200 ms
OpenBSD 6.6
--- 192.168.2.100 ping statistics ---
3600 packets transmitted, 3600 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.371/2.625/173.884/13.270 ms
OpenBSD 6.6 with commit reversed
--- 192.168.2.100 ping statistics ---
3600 packets transmitted, 3600 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.418/0.567/1.303/0.093 ms
OpenBSD 6.7
--- 192.168.2.100 ping statistics ---
3600 packets transmitted, 3600 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.392/1.312/170.699/4.993 ms
OpenBSD 6.7 with commit reversed
--- 192.168.2.100 ping statistics ---
3600 packets transmitted, 3600 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.397/0.545/1.263/0.071 ms
OpenBSD 6.8
--- 192.168.2.100 ping statistics ---
3600 packets transmitted, 3600 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.402/1.144/97.022/2.396 ms
OpenBSD 6.8 with commit reversed
--- 192.168.2.100 ping statistics ---
3600 packets transmitted, 3600 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.466/0.935/2.116/0.239 ms
OpenBSD 2021-01-03 snapshot
--- 192.168.2.100 ping statistics ---
3600 packets transmitted, 3600 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.405/1.192/79.021/2.304 ms
OpenBSD 6.8 (GENERIC.MP) #98: Sun Oct 4 18:13:26 MDT 2020
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 4164894720 (3971MB)
avail mem = 4023623680 (3837MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xebfd0 (51 entries)
bios0: vendor American Megatrends Inc. version "5.6.5" date 05/14/2019
bios0: Protectli FW1
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S5
acpi0: tables DSDT FACP APIC FPDT FIDT MCFG LPIT HPET SSDT SSDT SSDT
UEFI
acpi0: wakeup devices PS2K(S0) PS2M(S0) XHC1(S4) RP01(S4) PXSX(S4)
RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Celeron(R) CPU J1900 @ 1.99GHz, 2000.45 MHz, 06-37-09
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,DEADLINE,RDRAND,NXE,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,TSC_ADJUST,SMEP,ERMS,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,MELTDOWN
cpu0: 1MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88