On 01/25/17 01:32, Martin Pieuchot wrote: > I just enabled the NET_LOCK() again and I'm looking for test reports. > Please go build a kernel from sources or wait for the next snapshot, > run it and report back. > > If you're looking for some small coding tasks related to the NET_LOCK() > just do: > > # sysctl kern.splassert=2 > # sysctl kern.pool_debug=2 > > Then watch for the traces on your console. > > You'll see something like: > > Starting stack trace... > yield(0,1,d09dac52,f5549dbc,d94e9378) at yield+0xa4 > yield(d0bc8f40,1,f5549e18,80,14) at yield+0xa4 > pool_get(d0bc8f40,1,f5549ec8,d03ecbfb,d97815f4) at pool_get+0x1ba > m_get(1,3,f5549ec0,d03a9362,d0bc22e0) at m_get+0x30 > doaccept(d977e6c4,3,cf7ee4f8,cf7ee4ec,2000) at doaccept+0x193 > sys_accept(d977e6c4,f5549f5c,f5549f7c,0,f5549fa8) at sys_accept+0x37 > syscall() at syscall+0x250 > > This means accept(2) is doing a memory allocation that can sleep, here > with m_get(9), while holding the NET_LOCK(). Even if these should be > ok, it is easy to avoid them. In the case of doaccept() a mbuf could > be allocated beforehand or simply use the stack for that.
I updated a nuc w/ amd64 -current (GENERIC.MP) #154 and have more data. The nuc doesn't have a serial port so I extracted[1] dmesg parts from /var/log/messages. Here's a bit of a summary: >cut -d\ -f4- messages.nuc2.NET_LOCK.01|grep -e 'syscall ' | sort|uniq -c|sort >-nr 32 --- syscall (number 97) --- 31 --- syscall (number 55) --- 21 --- syscall (number 54) --- 13 --- syscall (number 118) --- 9 --- syscall (number 105) --- [1]<http://arp.thrush.com/obsd/messages.nuc2.NET_LOCK.01> ###################################################################### OpenBSD 6.0-current (GENERIC.MP) #154: Wed Jan 25 19:50:16 MST 2017 [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 16959188992 (16173MB) avail mem = 16440545280 (15678MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.8 @ 0x9eee3000 (56 entries) bios0: vendor Intel Corporation version "MYBDWi5v.86A.0033.2016.1124.2006" date 11/24/2016 bios0: Intel Corporation NUC5i5MYBE acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP APIC FPDT FIDT MCFG HPET SSDT UEFI LPIT SSDT ASF! SSDT SSDT SSDT DMAR BGRT acpi0: wakeup devices PEGP(S4) PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) [...] acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz, 2295.06 MHz 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,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SENSOR,ARAT cpu0: 256KB 64b/line 8-way L2 cache cpu0: TSC frequency 2295060110 Hz cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges cpu0: apic clock running at 99MHz cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE cpu1 at mainbus0: apid 2 (application processor) cpu1: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz, 2294.69 MHz cpu1: 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,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SENSOR,ARAT cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 0, core 1, package 0 cpu2 at mainbus0: apid 1 (application processor) cpu2: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz, 2294.70 MHz cpu2: 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,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SENSOR,ARAT cpu2: 256KB 64b/line 8-way L2 cache cpu2: smt 1, core 0, package 0 cpu3 at mainbus0: apid 3 (application processor) cpu3: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz, 2294.69 MHz cpu3: 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,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SENSOR,ARAT cpu3: 256KB 64b/line 8-way L2 cache cpu3: smt 1, core 1, package 0 ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 40 pins acpimadt0: bogus nmi for apid 0 acpimadt0: bogus nmi for apid 2 acpimadt0: bogus nmi for apid 1 acpimadt0: bogus nmi for apid 3 acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63 acpihpet0 at acpi0: 14318179 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (PEG0) acpiprt2 at acpi0: bus -1 (PEG1) acpiprt3 at acpi0: bus -1 (PEG2) acpiprt4 at acpi0: bus -1 (RP01) acpiprt5 at acpi0: bus -1 (RP02) acpiprt6 at acpi0: bus -1 (RP03) acpiprt7 at acpi0: bus -1 (RP04) acpiprt8 at acpi0: bus -1 (RP05) acpiprt9 at acpi0: bus -1 (RP06) acpiprt10 at acpi0: bus -1 (RP07) acpiprt11 at acpi0: bus -1 (RP08) acpiec0 at acpi0: not present acpicpu0 at acpi0: C3(200@506 mwait.1@0x60), C2(200@117 mwait.1@0x30), C1(1000@1 mwait.1), PSS acpicpu1 at acpi0: C3(200@506 mwait.1@0x60), C2(200@117 mwait.1@0x30), C1(1000@1 mwait.1), PSS acpicpu2 at acpi0: C3(200@506 mwait.1@0x60), C2(200@117 mwait.1@0x30), C1(1000@1 mwait.1), PSS acpicpu3 at acpi0: C3(200@506 mwait.1@0x60), C2(200@117 mwait.1@0x30), C1(1000@1 mwait.1), PSS acpipwrres0 at acpi0: PG00, resource for PEG0 acpipwrres1 at acpi0: PG01, resource for PEG1 acpipwrres2 at acpi0: PG02, resource for PEG2 acpipwrres3 at acpi0: WRST acpipwrres4 at acpi0: WRST acpipwrres5 at acpi0: WRST acpipwrres6 at acpi0: WRST acpipwrres7 at acpi0: WRST acpipwrres8 at acpi0: WRST acpipwrres9 at acpi0: WRST acpipwrres10 at acpi0: WRST acpipwrres11 at acpi0: FN00, resource for FAN0 acpipwrres12 at acpi0: FN01, resource for FAN1 acpipwrres13 at acpi0: FN02, resource for FAN2 acpipwrres14 at acpi0: FN03, resource for FAN3 acpipwrres15 at acpi0: FN04, resource for FAN4 acpitz0 at acpi0: critical temperature is 110 degC acpitz1 at acpi0: critical temperature is 110 degC "INT3F0D" at acpi0 not configured "INT3437" at acpi0 not configured "INT33A1" at acpi0 not configured dwiic0 at acpi0: I2C0 addr 0xfe103000/0x1000 irq 7 iic0 at dwiic0 dwiic1 at acpi0: I2C1 addr 0xfe105000/0x1000 irq 7 iic1 at dwiic1 acpibtn0 at acpi0: SLPB acpibtn1 at acpi0: PWRB "PNP0C0B" at acpi0 not configured "PNP0C0B" at acpi0 not configured "PNP0C0B" at acpi0 not configured "PNP0C0B" at acpi0 not configured "PNP0C0B" at acpi0 not configured acpivideo0 at acpi0: GFX0 acpivout0 at acpivideo0: DD1F cpu0: Enhanced SpeedStep 2295 MHz: speeds: 2301, 2300, 2200, 2000, 1900, 1800, 1700, 1500, 1400, 1300, 1100, 1000, 900, 800, 600, 500 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel Core 5G Host" rev 0x09 inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 5500" rev 0x09 drm0 at inteldrm0 inteldrm0: msi inteldrm0: 2560x1440, 32bpp error: [drm:pid0:intel_dp_set_idle_link_train] *ERROR* Timed out waiting for DP idle patterns wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation) wsdisplay0: screen 1-5 added (std, vt100 emulation) azalia0 at pci0 dev 3 function 0 "Intel Core 5G HD Audio" rev 0x09: msi azalia0: No codecs found xhci0 at pci0 dev 20 function 0 "Intel 9 Series xHCI" rev 0x03: msi usb0 at xhci0: USB revision 3.0 uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1 "Intel 9 Series MEI" rev 0x03 at pci0 dev 22 function 0 not configured em0 at pci0 dev 25 function 0 "Intel I218-LM" rev 0x03: msi, address b8:ae:ed:75:93:eb azalia1 at pci0 dev 27 function 0 "Intel 9 Series HD Audio" rev 0x03: msi azalia1: codecs: Realtek/0x0283 audio0 at azalia1 ehci0 at pci0 dev 29 function 0 "Intel 9 Series USB" rev 0x03: apic 2 int 23 usb1 at ehci0: USB revision 2.0 uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 pcib0 at pci0 dev 31 function 0 "Intel 9 Series LPC" rev 0x03 ahci0 at pci0 dev 31 function 2 "Intel 9 Series AHCI" rev 0x03: msi, AHCI 1.3 ahci0: port 0: 6.0Gb/s ahci0: port 3: 6.0Gb/s scsibus1 at ahci0: 32 targets sd0 at scsibus1 targ 0 lun 0: <ATA, Corsair Force LE, SAFC> SCSI3 0/direct fixed t10.ATA_Corsair_Force_LE_SSD_16308020000105670292 sd0: 457862MB, 512 bytes/sector, 937703088 sectors, thin sd1 at scsibus1 targ 3 lun 0: <ATA, Samsung SSD 850, EMT2> SCSI3 0/direct fixed naa.5002538d40b3afb8 sd1: 238475MB, 512 bytes/sector, 488397168 sectors, thin ichiic0 at pci0 dev 31 function 3 "Intel 9 Series SMBus" rev 0x03: apic 2 int 18 iic2 at ichiic0 spdmem0 at iic2 addr 0x50: 8GB DDR3 SDRAM PC3-12800 SO-DIMM spdmem1 at iic2 addr 0x52: 8GB DDR3 SDRAM PC3-12800 SO-DIMM isa0 at pcib0 isadma0 at isa0 fdc0 at isa0 port 0x3f0/6 irq 6 drq 2 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0: console keyboard, using wsdisplay0 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 wbsio0 at isa0 port 0x4e/2: NCT6776F rev 0x33 lm1 at wbsio0 port 0xa00/8: NCT6776F vmm0 at mainbus0: VMX/EPT efifb at mainbus0 not configured axe0 at uhub0 port 2 configuration 1 interface 0 "ASIX Electronics USB 2.0 10/100 Ethernet controller" rev 2.00/0.01 addr 2 axe0: AX88172, address 00:10:60:0a:b4:73 rlphy0 at axe0 phy 3: RTL8201L 10/100 PHY, rev. 1 uhub2 at uhub0 port 3 configuration 1 interface 0 "Genesys Logic USB2.0 Hub" rev 2.00/32.98 addr 3 uhidev0 at uhub2 port 1 configuration 1 interface 0 "Generic USB" rev 1.10/1.10 addr 4 uhidev0: iclass 3/1 ukbd0 at uhidev0: 8 variable keys, 6 key codes wskbd1 at ukbd0 mux 1 wskbd1: connecting to wsdisplay0 uhidev1 at uhub2 port 1 configuration 1 interface 1 "Generic USB" rev 1.10/1.10 addr 4 uhidev1: iclass 3/1, 3 report ids ums0 at uhidev1 reportid 1: 5 buttons, Z dir wsmouse0 at ums0 mux 0 uhid0 at uhidev1 reportid 2: input=2, output=0, feature=0 uhid1 at uhidev1 reportid 3: input=1, output=0, feature=0 uhub3 at uhub2 port 3 configuration 1 interface 0 "Texas Instruments product 0x8142" rev 2.00/1.00 addr 5 uhidev2 at uhub3 port 1 configuration 1 interface 0 "Kensington USB/PS2 Wheel Mouse" rev 1.10/1.01 addr 6 uhidev2: iclass 3/1 ums1 at uhidev2: 5 buttons, Z dir wsmouse1 at ums1 mux 0 uhidev3 at uhub3 port 3 configuration 1 interface 0 "Corsair Corsair STRAFE Gaming Keyboard" rev 2.00/2.04 addr 7 uhidev3: iclass 3/1 ukbd1 at uhidev3: 8 variable keys, 6 key codes wskbd2 at ukbd1 mux 1 wskbd2: connecting to wsdisplay0 uhidev4 at uhub3 port 3 configuration 1 interface 1 "Corsair Corsair STRAFE Gaming Keyboard" rev 2.00/2.04 addr 7 uhidev4: iclass 3/0, 14 report ids ukbd2 at uhidev4 reportid 1: 128 variable keys, 0 key codes wskbd3 at ukbd2 mux 1 wskbd3: connecting to wsdisplay0 uhid2 at uhidev4 reportid 2: input=4, output=0, feature=0 uhid3 at uhidev4 reportid 3: input=63, output=0, feature=0 uhid4 at uhidev4 reportid 14: input=63, output=0, feature=0 uhidev5 at uhub3 port 3 configuration 1 interface 2 "Corsair Corsair STRAFE Gaming Keyboard" rev 2.00/2.04 addr 7 uhidev5: no input interrupt endpoint uhub4 at uhub1 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.03 addr 2 vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets root on sd1a (df92bb398986da6c.a) swap on sd1b dump on sd1b
