Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jun 2015 15:08:35 +0300
From:      Slawa Olhovchenkov <slw@zxy.spb.ru>
To:        freebsd-stable@freebsd.org, Ryan Stone <rysto32@gmail.com>
Subject:   pmcstat on selected cpu -- posible bug?
Message-ID:  <20150627120835.GK58397@zxy.spb.ru>

next in thread | raw e-mail | index | archive | help
I have dual-socket E5v3 system and try to profiling source of CPU load
on first socket.

cpuset -l 1 pmcstat -S CPU_CLK_UNHALTED_CORE -l 10 -c 1 -n 500 -O sample.out
pmcstat -R sample.out -G out.txt -k /boot/kernel.VSTREAM
cat out.txt | ./stackcollapse-pmc.pl | ./flamegraph.pl --width=1200 > cpi.svg

cpi.svg can be see at http://zxy.spb.ru/cpi.svg

I see many times send in t4_intr, but all chelsio interrupt handlers (t4_intr)
binded to second CPU socket:

# vmstat -i
interrupt                          total       rate
irq9: acpi0                            4          0
irq18: ehci0 ehci1               2893412          2
irq19: xhci0                     3185327          2
cpu0:timer                    1532629922       1093
irq264: mps0                  1399546223        998
irq265: mps1                  3638584876       2595
irq266: ahci0                 3049531638       2175
irq267: ahci1                  707587584        504
irq268: mps2                  6161214642       4395
irq270: t5nex0:evt                     4          0
irq281: t5nex0:1.0           62811267214      44810
irq282: t5nex0:1.1           63080900542      45002
irq283: t5nex0:1.2           62979721970      44930
irq284: t5nex0:1.3           62968826175      44922
irq285: t5nex0:1.4           62963754266      44918
irq286: t5nex0:1.5           63303732253      45161
irq287: t5nex0:1.6           63012633949      44953
irq288: t5nex0:1.7           63538714658      45328
irq289: t5nex0:1,0                 73899          0
irq290: t5nex0:1,1                111666          0
cpu3:timer                    1534027652       1094
cpu6:timer                    1546786165       1103
cpu13:timer                   1588099533       1132
cpu2:timer                    1534703017       1094
cpu7:timer                    1553306409       1108
cpu9:timer                    1586733982       1131
cpu1:timer                    1538685850       1097
cpu8:timer                    1587569958       1132
cpu5:timer                    1537756504       1097
cpu12:timer                   1585898180       1131
cpu4:timer                    1530812247       1092
cpu10:timer                   1586851448       1132
cpu15:timer                   1586024994       1131
cpu11:timer                   1587022608       1132
cpu14:timer                   1586503852       1131
Total                       544625692623     388539

# cpuset -g -x 281
irq 281 mask: 8
irq 282 mask: 9
irq 283 mask: 10
irq 284 mask: 11
irq 285 mask: 12
irq 286 mask: 13
irq 287 mask: 14
irq 288 mask: 15
irq 289 mask: 8
irq 290 mask: 12

Cross-checked by dtrace:
# dtrace -n '::t4_intr:entry { @[stringof(curthread->td_name), curthread->td_oncpu] = count(); }'
dtrace: description '::t4_intr:entry ' matched 1 probe
^C

  irq282: t5nex0:1.1                                   9           361413
  irq281: t5nex0:1.0                                   8           361573
  irq285: t5nex0:1.4                                  12           364535
  irq283: t5nex0:1.2                                  10           365919
  irq284: t5nex0:1.3                                  11           366386
  irq287: t5nex0:1.6                                  14           367603
  irq286: t5nex0:1.5                                  13           368409
  irq288: t5nex0:1.7                                  15           371441

What is wrong? Bug in pmcstat?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150627120835.GK58397>