From owner-freebsd-bugs@freebsd.org Tue May 8 18:13:08 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E276FC43F0 for ; Tue, 8 May 2018 18:13:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 7D8A96D716 for ; Tue, 8 May 2018 18:13:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 1AE97FC43EE; Tue, 8 May 2018 18:13:07 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65AEFFC43EB for ; Tue, 8 May 2018 18:13:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A93506D6CE for ; Tue, 8 May 2018 18:13:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id DF3FC27881 for ; Tue, 8 May 2018 18:13:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w48ID4MA065865 for ; Tue, 8 May 2018 18:13:04 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w48ID4G3065855 for bugs@FreeBSD.org; Tue, 8 May 2018 18:13:04 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 228076] [sched_ule] Not stealing process from loaded CPU Date: Tue, 08 May 2018 18:13:04 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: mit@pt.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 May 2018 18:13:08 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228076 Bug ID: 228076 Summary: [sched_ule] Not stealing process from loaded CPU Product: Base System Version: 11.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: mit@pt.net We are having a problem with the ule scheduler scheduling a process to run = on a processor that is monopolized by a realtime thread and in turn never runnin= g or getting "stolen" from that proccessor's queue to run on another.=20=20 This happens readily in our application utilizing FreeBSD. Since it would = be impossible for a 3rd party to run our software, I came up with a test suite that reproduces the issue, but it needs to run for awhile for the lockup to happen. To reproduce the issue, run three shells. One runs "many" which starts real= time threads on all but one available processor. Next run "runOne" which starts= a realtime thread on the last available processor for a period of time, then exits, repeating the process. Finally, run "runIfconfig" which just calls ifconfig in a loop. Eventually ifconfig will get stuck in "RUN" state. Changing the "kern.sched.steal_thresh" to 1 has no effect. The source for the programs and scripts are after the test machines details. Snapshot of top showing the locked process (ifconfig) in the test: last pid: 89788; load averages: 8.02, 8.09, 9.71=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 = up 0+19:15:59 14:40:09 49 processes: 9 running, 40 sleeping CPU: 87.5% user, 0.0% nice, 0.0% system, 0.0% interrupt, 12.5% idle Mem: 6784K Active, 50M Inact, 3087M Wired, 286M Buf, 28G Free Swap: 4096M Total, 4096M Free PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND 89782 root 20 0 19600K 3660K ttyin 7 0:00 0.00% csh 89779 root 20 0 83092K 8288K select 7 0:00 0.00% sshd 89725 root 52 0 6244K 1996K nanslp 7 0:00 0.00% sleep 89717 root 52 0 13144K 2832K wait 7 0:00 0.00% sh 89125 root 20 0 19600K 3704K ttyin 7 0:00 0.00% csh 53534 root 20 0 8392K 2220K piperd 7 0:00 0.00% mail 53533 root 52 0 13144K 2816K wait 7 0:00 0.00% sh 53526 root 52 0 13144K 2808K wait 7 0:00 0.00% sh 53525 root 21 0 6244K 2004K wait 7 0:00 0.00% lockf 53523 root 21 0 13144K 2808K wait 7 0:00 0.00% sh 53521 root 20 0 13144K 2812K wait 7 0:00 0.00% sh 51764 root 20 0 8392K 2216K piperd 7 0:00 0.00% mail 51763 root 20 0 13144K 2816K wait 7 0:00 0.00% sh 51754 root 52 0 13144K 2808K wait 7 0:00 0.00% sh 51752 root 21 0 6244K 2004K wait 7 0:00 0.00% lockf 51748 root 21 0 13144K 2808K wait 7 0:00 0.00% sh 51746 root 20 0 12564K 2564K piperd 7 0:00 0.00% cron 38859 root 72 0 19104K 2768K RUN 6 0:00 0.00% ifconfig 6945 root 20 0 13460K 2452K nanslp 7 0:00 0.00% many{many} 6945 root -21 r31F 13460K 2452K CPU0 0 19.2H 99.06% many{many} 6945 root -21 r31F 13460K 2452K CPU1 1 19.2H 89.40% many{many} 6945 root -21 r31F 13460K 2452K CPU2 2 19.2H 100.00% many{many} 6945 root -21 r31F 13460K 2452K CPU3 3 19.2H 89.41% many{many} 6945 root -21 r31F 13460K 2452K CPU4 4 19.2H 89.40% many{many} 6945 root -21 r31F 13460K 2452K CPU5 5 19.2H 89.39% many{many} 6945 root -21 r31F 13460K 2452K CPU6 6 19.1H 99.31% many{many} 887 root 52 0 16664K 3984K wait 7 2:36 0.00% ksh93 ... Details of the test system: uname -a: FreeBSD fbdev 11.1-RELEASE-p9 FreeBSD 11.1-RELEASE-p9 #0: Tue Apr 3 16:59:= 16 UTC 2018 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERI= C=20 amd64 root@fbl:~ # pciconf -l hostb0@pci0:0:0:0: class=3D0x060000 card=3D0x01588086 chip=3D0x0158808= 6 rev=3D0x09 hdr=3D0x00 pcib1@pci0:0:1:0: class=3D0x060400 card=3D0x01518086 chip=3D0x0151808= 6 rev=3D0x09 hdr=3D0x01 vgapci0@pci0:0:2:0: class=3D0x030000 card=3D0x21118086 chip=3D0x016a808= 6 rev=3D0x09 hdr=3D0x00 pcib2@pci0:0:6:0: class=3D0x060400 card=3D0x015d8086 chip=3D0x015d808= 6 rev=3D0x09 hdr=3D0x01 none0@pci0:0:22:0: class=3D0x078000 card=3D0x1c3a8086 chip=3D0x1c3a808= 6 rev=3D0x04 hdr=3D0x00 ehci0@pci0:0:26:0: class=3D0x0c0320 card=3D0x1c2d8086 chip=3D0x1c2d808= 6 rev=3D0x05 hdr=3D0x00 pcib3@pci0:0:28:0: class=3D0x060400 card=3D0x1c108086 chip=3D0x1c10808= 6 rev=3D0xb5 hdr=3D0x01 ehci1@pci0:0:29:0: class=3D0x0c0320 card=3D0x1c268086 chip=3D0x1c26808= 6 rev=3D0x05 hdr=3D0x00 pcib4@pci0:0:30:0: class=3D0x060401 card=3D0x244e8086 chip=3D0x244e808= 6 rev=3D0xa5 hdr=3D0x01 isab0@pci0:0:31:0: class=3D0x060100 card=3D0x1c568086 chip=3D0x1c56808= 6 rev=3D0x05 hdr=3D0x00 ahci0@pci0:0:31:2: class=3D0x010601 card=3D0x1c028086 chip=3D0x1c02808= 6 rev=3D0x05 hdr=3D0x00 none1@pci0:0:31:3: class=3D0x0c0500 card=3D0x1c228086 chip=3D0x1c22808= 6 rev=3D0x05 hdr=3D0x00 ix0@pci0:1:0:0: class=3D0x020000 card=3D0xffffffff chip=3D0x10fb8086 rev=3D= 0x01 hdr=3D0x00 ix1@pci0:1:0:1: class=3D0x020000 card=3D0xffffffff chip=3D0x10fb8086 rev=3D= 0x01 hdr=3D0x00 igb0@pci0:2:0:0: class=3D0x020000 card=3D0x00008086 chip=3D0x150e808= 6 rev=3D0x01 hdr=3D0x00 igb1@pci0:2:0:1: class=3D0x020000 card=3D0x00008086 chip=3D0x150e808= 6 rev=3D0x01 hdr=3D0x00 igb2@pci0:3:0:0: class=3D0x020000 card=3D0x00008086 chip=3D0x150e808= 6 rev=3D0x01 hdr=3D0x00 igb3@pci0:3:0:1: class=3D0x020000 card=3D0x00008086 chip=3D0x150e808= 6 rev=3D0x01 hdr=3D0x00 none2@pci0:4:0:0: class=3D0x020000 card=3D0x012310ec chip=3D0x816710e= c rev=3D0x10 hdr=3D0x00 dmeag -a: Copyright (c) 1992-2017 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.1-RELEASE-p9 #0: Tue Apr 3 16:59:16 UTC 2018 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0) VT(vga): resolution 640x480 CPU: Intel(R) Xeon(R) CPU E3-1275 V2 @ 3.50GHz (3492.14-MHz K8-class CPU) Origin=3D"GenuineIntel" Id=3D0x306a9 Family=3D0x6 Model=3D0x3a Steppi= ng=3D9 =20 Features=3D0xbfebfbff =20 Features2=3D0x7fbae3ff AMD Features=3D0x28100800 AMD Features2=3D0x1 Structured Extended Features=3D0x281 XSAVE Features=3D0x1 VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID TSC: P-state invariant, performance statistics real memory =3D 34359738368 (32768 MB) avail memory =3D 33212313600 (31673 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 hardware threads random: unblocking device. ioapic0 irqs 0-23 on motherboard SMP: AP CPU #1 Launched! SMP: AP CPU #4 Launched! SMP: AP CPU #2 Launched! SMP: AP CPU #3 Launched! SMP: AP CPU #5 Launched! SMP: AP CPU #6 Launched! SMP: AP CPU #7 Launched! Timecounter "TSC-low" frequency 1746072482 Hz quality 1000 random: entropy device external interface kbd1 at kbdmux0 netmap: loaded module module_register_init: MOD_LOAD (vesa, 0xffffffff80f5eb40, 0) error 19 random: registering fast source Intel Secure Key RNG random: fast provider: "Intel Secure Key RNG" 0: virt=3D0xfffffe0859800000 phys=3D0x100000000 1: virt=3D0xfffffe0899800000 phys=3D0x140000000 nexus0 vtvga0: on motherboard cryptosoft0: on motherboard acpi0: on motherboard acpi0: Power Button (fixed) cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 cpu4: on acpi0 cpu5: on acpi0 cpu6: on acpi0 cpu7: on acpi0 hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 950 Event timer "HPET" frequency 14318180 Hz quality 550 atrtc0: port 0x70-0x77 irq 8 on acpi0 atrtc0: Warning: Couldn't map I/O. Event timer "RTC" frequency 32768 Hz quality 0 attimer0: port 0x40-0x43,0x50-0x53 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pcib0: _OSC returned error 0x10 pci0: on pcib0 pcib1: irq 16 at device 1.0 on pci0 pci1: on pcib1 ix0: po= rt 0xe020-0xe03f mem 0xf7d20000-0xf7d3ffff,0xf7d44000-0xf7d47fff irq 16 at dev= ice 0.0 on pci1 ix0: Using MSIX interrupts with 9 vectors ix0: Ethernet address: 08:00:8a:00:10:e0 ix0: PCI Express Bus: Speed 5.0GT/s Width x8 ix0: netmap queues/slots: TX 8/2048, RX 8/2048 ix1: po= rt 0xe000-0xe01f mem 0xf7d00000-0xf7d1ffff,0xf7d40000-0xf7d43fff irq 17 at dev= ice 0.1 on pci1 ix1: Using MSIX interrupts with 9 vectors ix1: Ethernet address: 08:00:8a:00:10:e1 ix1: PCI Express Bus: Speed 5.0GT/s Width x8 ix1: netmap queues/slots: TX 8/2048, RX 8/2048 vgapci0: port 0xf000-0xf03f mem 0xf7400000-0xf77fffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0 vgapci0: Boot video device pcib2: irq 19 at device 6.0 on pci0 pci2: on pcib2 igb0: port 0xd020-0xd03f mem 0xf7a80000-0xf7afffff,0xf7b04000-0xf7b07fff irq 19 at dev= ice 0.0 on pci2 igb0: Using MSIX interrupts with 9 vectors igb0: Ethernet address: 08:00:8a:00:00:82 igb0: Bound queue 0 to cpu 0 igb0: Bound queue 1 to cpu 1 igb0: Bound queue 2 to cpu 2 igb0: Bound queue 3 to cpu 3 igb0: Bound queue 4 to cpu 4 igb0: Bound queue 5 to cpu 5 igb0: Bound queue 6 to cpu 6 igb0: Bound queue 7 to cpu 7 igb0: netmap queues/slots: TX 8/1024, RX 8/1024 igb1: port 0xd000-0xd01f mem 0xf7a00000-0xf7a7ffff,0xf7b00000-0xf7b03fff irq 16 at dev= ice 0.1 on pci2 igb1: Using MSIX interrupts with 9 vectors igb1: Ethernet address: 08:00:8a:00:00:83 igb1: Bound queue 0 to cpu 0 igb1: Bound queue 1 to cpu 1 igb1: Bound queue 2 to cpu 2 igb1: Bound queue 3 to cpu 3 igb1: Bound queue 4 to cpu 4 igb1: Bound queue 5 to cpu 5 igb1: Bound queue 6 to cpu 6 igb1: Bound queue 7 to cpu 7 igb1: netmap queues/slots: TX 8/1024, RX 8/1024 pci0: at device 22.0 (no driver attached) ehci0: mem 0xf7e04000-0xf7e043ff ir= q 16 at device 26.0 on pci0 usbus0: EHCI version 1.0 usbus0 on ehci0 usbus0: 480Mbps High Speed USB v2.0 pcib3: irq 16 at device 28.0 on pci0 pci3: on pcib3 igb2: port 0xc020-0xc03f mem 0xf7880000-0xf78fffff,0xf7904000-0xf7907fff irq 16 at dev= ice 0.0 on pci3 igb2: Using MSIX interrupts with 9 vectors igb2: Ethernet address: 08:00:8a:00:00:80 igb2: Bound queue 0 to cpu 0 igb2: Bound queue 1 to cpu 1 igb2: Bound queue 2 to cpu 2 igb2: Bound queue 3 to cpu 3 igb2: Bound queue 4 to cpu 4 igb2: Bound queue 5 to cpu 5 igb2: Bound queue 6 to cpu 6 igb2: Bound queue 7 to cpu 7 igb2: netmap queues/slots: TX 8/1024, RX 8/1024 igb3: port 0xc000-0xc01f mem 0xf7800000-0xf787ffff,0xf7900000-0xf7903fff irq 17 at dev= ice 0.1 on pci3 igb3: Using MSIX interrupts with 9 vectors igb3: Ethernet address: 08:00:8a:00:00:81 igb3: Bound queue 0 to cpu 0 igb3: Bound queue 1 to cpu 1 igb3: Bound queue 2 to cpu 2 igb3: Bound queue 3 to cpu 3 igb3: Bound queue 4 to cpu 4 igb3: Bound queue 5 to cpu 5 igb3: Bound queue 6 to cpu 6 igb3: Bound queue 7 to cpu 7 igb3: netmap queues/slots: TX 8/1024, RX 8/1024 ehci1: mem 0xf7e03000-0xf7e033ff ir= q 23 at device 29.0 on pci0 usbus1: EHCI version 1.0 usbus1 on ehci1 usbus1: 480Mbps High Speed USB v2.0 pcib4: at device 30.0 on pci0 pci4: on pcib4 re0: port 0xb000-0xb0ff mem 0xf7c20000-0xf7c200ff irq 16 at device 0.0 on pci4 re0: Chip rev. 0x18000000 re0: MAC rev. 0x00000000 miibus0: on re0 rgephy0: PHY 1 on miibus0 rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-F= DX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow re0: Using defaults for TSO: 65518/35/2048 re0: Ethernet address: 00:90:0b:29:07:b2 re0: netmap queues/slots: TX 1/256, RX 1/256 isab0: at device 31.0 on pci0 isa0: on isab0 ahci0: port 0xf0b0-0xf0b7,0xf0a0-0xf0a3,0xf090-0xf097,0xf080-0xf083,0xf060-0xf07f mem 0xf7e02000-0xf7e027ff irq 19 at device 31.2 on pci0 ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported ahcich2: at channel 2 on ahci0 ahciem0: on ahci0 acpi_button0: on acpi0 acpi_tz0: on acpi0 acpi_tz1: on acpi0 ppc1: port 0x378-0x37f irq 5 on acpi0 ppc1: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc1 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] ppc0: cannot reserve I/O port range est0: on cpu0 est1: on cpu1 est2: on cpu2 est3: on cpu3 est4: on cpu4 est5: on cpu5 est6: on cpu6 est7: on cpu7 Timecounters tick every 1.000 msec nvme cam probe device init ugen1.1: at usbus1 ugen0.1: at usbus0 uhub0: on usbus1 uhub1: on usbus0 ses0 at ahciem0 bus 0 scbus1 target 0 lun 0 ses0: SEMB S-E-S 2.00 device ses0: SEMB SES Device ada0 at ahcich2 bus 0 scbus0 target 0 lun 0 ada0: ATA SATA 1.x device ada0: Serial Number A2323035180354000072 ada0: 150.000MB/s transfers (SATA 1.x, UDMA2, PIO 512bytes) ada0: 15280MB (31293440 512 byte sectors) Trying to mount root from ufs:/dev/ada0p3 [rw]... Setting hostuuid: c84483e3-9171-11e6-a133-08008a0010e0. Setting hostid: 0x224a41c7. Starting file system checks: /dev/ada0p3: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/ada0p3: clean, 519318 free (6518 frags, 64100 blocks, 0.2% fragmentati= on) uhub0: 2 ports with 2 removable, self powered uhub1: 2 ports with 2 removable, self powered Mounting local filesystems:. ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/gcc49 /usr/local/lib/perl5/5.20/mach/CORE /etc/ld-elf.so.conf 32-bit compatibility ldconfig path: /usr/lib32 Setting hostname: fbl. Setting up harvesting: [UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTA= CH,CACHED Feeding entropy:=20 ugen0.2: at usbus0 uhub2 on uhub1 uhub2: on usbus0 ugen1.2: at usbus1 uhub3 on uhub0 uhub3: on usbus1 . uhub2: 6 ports with 6 removable, self powered uhub3: 8 ports with 8 removable, self powered ugen1.3: at usbus1 ukbd0 on uhub3 ukbd0: on usbus1 kbd2 at ukbd0 igb2: link state changed to UP Starting Network: lo0 ix0 ix1 igb0 igb1 igb2 igb3 re0. lo0: flags=3D8049 metric 0 mtu 16384 options=3D600003 inet6 ::1 prefixlen 128=20 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8=20 inet 127.0.0.1 netmask 0xff000000=20 nd6 options=3D21 groups: lo=20 ix0: flags=3D8802 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3De407bb ether 08:00:8a:00:10:e0 hwaddr 08:00:8a:00:10:e0 nd6 options=3D29 media: Ethernet autoselect status: no carrier ix1: flags=3D8802 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3De407bb ether 08:00:8a:00:10:e1 hwaddr 08:00:8a:00:10:e1 nd6 options=3D29 media: Ethernet autoselect status: no carrier igb0: flags=3D8c02 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D6403bb ether 08:00:8a:00:00:82 hwaddr 08:00:8a:00:00:82 nd6 options=3D29 media: Ethernet autoselect status: no carrier igb1: flags=3D8c02 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D6403bb ether 08:00:8a:00:00:83 hwaddr 08:00:8a:00:00:83 nd6 options=3D29 media: Ethernet autoselect status: no carrier igb2: flags=3D8843 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D6403bb ether 08:00:8a:00:00:80 hwaddr 08:00:8a:00:00:80 inet 206.210.221.193 netmask 0xffffff00 broadcast 206.210.221.255=20 nd6 options=3D29 media: Ethernet autoselect (100baseTX ) status: active igb3: flags=3D8c02 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D6403bb ether 08:00:8a:00:00:81 hwaddr 08:00:8a:00:00:81 nd6 options=3D29 media: Ethernet autoselect status: no carrier re0: flags=3D8802 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D8209b ether 00:90:0b:29:07:b2 hwaddr 00:90:0b:29:07:b2 nd6 options=3D29 re0: link state changed to DOWN media: Ethernet autoselect (10baseT/UTP ) status: no carrier Starting devd. Starting Network: ix0. ix0: flags=3D8802 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3De407bb ether 08:00:8a:00:10:e0 hwaddr 08:00:8a:00:10:e0 nd6 options=3D29 media: Ethernet autoselect status: no carrier Starting Network: ix1. ix1: flags=3D8802 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3De407bb ether 08:00:8a:00:10:e1 hwaddr 08:00:8a:00:10:e1 nd6 options=3D29 media: Ethernet autoselect status: no carrier Starting Network: igb0. igb0: flags=3D8c02 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D6403bb ether 08:00:8a:00:00:82 hwaddr 08:00:8a:00:00:82 nd6 options=3D29 media: Ethernet autoselect status: no carrier Starting Network: igb1. igb1: flags=3D8c02 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D6403bb ether 08:00:8a:00:00:83 hwaddr 08:00:8a:00:00:83 nd6 options=3D29 media: Ethernet autoselect status: no carrier Starting Network: igb3. igb3: flags=3D8c02 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D6403bb ether 08:00:8a:00:00:81 hwaddr 08:00:8a:00:00:81 nd6 options=3D29 media: Ethernet autoselect status: no carrier Starting Network: re0. re0: flags=3D8802 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3D8209b ether 00:90:0b:29:07:b2 hwaddr 00:90:0b:29:07:b2 nd6 options=3D29 media: Ethernet autoselect (10baseT/UTP ) status: no carrier add host 127.0.0.1: gateway lo0 fib 0: route already in table add net default: gateway 206.210.221.1 add host ::1: gateway lo0 fib 0: route already in table add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 Generating host.conf. Mounting NFS filesystems:. ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/gcc49 /usr/local/lib/perl5/5.20/mach/CORE /etc/ld-elf.so.conf 32-bit compatibility ldconfig path: /usr/lib32 Creating and/or trimming log files. Starting syslogd. Sources: many.c: #include #include #include #include #include #include static int cpu =3D 0; void *run (void *data) { cpuset_t cpuset; struct sched_param scheduleParam; CPU_ZERO(&cpuset); CPU_SET(cpu, &cpuset); cpu++; int err =3D pthread_setaffinity_np(pthread_self(), sizeof(cpuset_t), &cp= uset); printf("pthread_setaffinity_np: %d\n", err); sched_getparam(0, &scheduleParam); scheduleParam.sched_priority =3D sched_get_priority_min(SCHED_FIFO); sched_setscheduler(0, SCHED_FIFO, &scheduleParam); while (1) ; } int main (void) { pthread_t tp[32]; uint32_t nCpu =3D 0; size_t cpuLen =3D sizeof nCpu; if (sysctlbyname("hw.ncpu", &nCpu, &cpuLen, NULL, 0) >=3D 0 && cpuLen = =3D=3D sizeof nCpu) { printf("%d CPUs available, starting realtime processes on %d of them\= n", nCpu, nCpu - 1); for (int ix =3D 0; ix < nCpu - 1; ++ix) { pthread_create(&tp[ix], NULL, run, NULL); } while (1) sleep(1); } return (0); } one.c: #include #include #include #include #include #include #include #include #include #include int getIfData (struct ifmibdata *mib, char *name) { size_t len; int idx, pkt[6]; idx =3D if_nametoindex(name); if (idx =3D=3D 0) { return -1; } memset(mib, 0, sizeof(struct ifmibdata)); pkt[0] =3D CTL_NET; pkt[1] =3D PF_LINK; pkt[2] =3D NETLINK_GENERIC; pkt[3] =3D IFMIB_IFDATA; pkt[4] =3D idx; pkt[5] =3D IFDATA_GENERAL; len =3D sizeof(struct ifmibdata); if (sysctl(pkt, 6, mib, &len, NULL, 0) =3D=3D -1) { return -1; } return idx; } uint64_t nanoseconds (struct timespec* ts) { return ts->tv_sec * (uint64_t)1000000000L + ts->tv_nsec; } int main (int argc, char *argv[]) { if (argc < 2) { printf("Please supply number of seconds to run\n"); exit(1); } double secs =3D atof(argv[1]); uint32_t nCpu =3D 0; size_t cpuLen =3D sizeof nCpu; if (sysctlbyname("hw.ncpu", &nCpu, &cpuLen, NULL, 0) >=3D 0 && cpuLen = =3D=3D sizeof nCpu) { cpuset_t cpuset; struct sched_param scheduleParam; CPU_ZERO(&cpuset); CPU_SET(nCpu - 1, &cpuset); pthread_setaffinity_np(pthread_self(), sizeof(cpuset_t), &cpuset); sched_getparam(0, &scheduleParam); scheduleParam.sched_priority =3D sched_get_priority_min(SCHED_FIFO); sched_setscheduler(0, SCHED_FIFO, &scheduleParam); printf("Running for %s second(s) on cpu %d\n", argv[1], nCpu - 1); struct timespec tsNow, tsEnd; tsEnd.tv_sec =3D (int)secs; tsEnd.tv_nsec =3D (double)(secs - tsEnd.tv_sec) * (uint64_t)100000000= 0L;=20 clock_gettime(CLOCK_REALTIME, &tsNow); uint64_t start =3D nanoseconds(&tsNow); uint64_t stop =3D start + nanoseconds(&tsEnd); while (clock_gettime(CLOCK_REALTIME, &tsNow) =3D=3D 0 && nanoseconds(= &tsNow) < stop) { struct ifmibdata mib; getIfData(&mib, "lo0");=20 } } return (0); } compile: cc one.c -lthr -o one cc many.c -lthr -o many=20 runOne: #!/bin/ksh while true; do ./one 1.1; done; runIfconfig: #!/bin/ksh while true; do ifconfig; done; --=20 You are receiving this mail because: You are the assignee for the bug.=