GSoC: Add SMT/HT awareness to DragonFlyBSD scheduler

Mihai Carabas mihai.carabas at gmail.com
Sun Jul 29 11:01:04 PDT 2012


--14dae934116f99a22a04c5fbba48
Content-Type: text/plain; charset=ISO-8859-1

Hello,

Here are some results from a AMD FX(tm)-8150 Eight-Core Processor(thanks
profkmax):

############ enable smt ########
kern.usched_bsd4.smt_enable: 0 -> 1
tps = 32987.010952 (including connections establishing)
tps = 33072.952733 (including connections establishing)
tps = 32693.574568 (including connections establishing)
tps = 33084.277648 (including connections establishing)
tps = 33481.054536 (including connections establishing)
tps = 33013.296931 (including connections establishing)
tps = 32711.982849 (including connections establishing)
tps = 32686.120901 (including connections establishing)
tps = 32792.744933 (including connections establishing)
tps = 33367.284545 (including connections establishing)

############ disable smt ########
kern.usched_bsd4.smt_enable: 1 -> 0
tps = 31364.873850 (including connections establishing)
tps = 31340.974524 (including connections establishing)
tps = 31648.286265 (including connections establishing)
tps = 30913.788400 (including connections establishing)
tps = 31338.052583 (including connections establishing)
tps = 31360.521337 (including connections establishing)
tps = 31545.915474 (including connections establishing)
tps = 31489.008958 (including connections establishing)
tps = 30657.108291 (including connections establishing)
tps = 31294.472379 (including connections establishing)

The difference is > 1500tps (5%).

Here is an interesting CPU topology from a dual-socket XEON:
hw.cpu_topology.tree:
\-PACKAGE MEMBERS: cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 cpu8 cpu9 cpu10
cpu11 cpu12 cpu13 cpu14 cpu15 cpu16 cpu17 cpu18 cpu19 cpu20 cpu21 cpu22
cpu23
  |-CHIP ID 0: cpu1 cpu3 cpu5 cpu7 cpu9 cpu11 cpu13 cpu15 cpu17 cpu19 cpu21
cpu23
  | |-CORE ID 0: cpu1 cpu13
  | | |-THREAD ID 0: cpu1
  | | \-THREAD ID 1: cpu13
  | |-CORE ID 1: cpu3 cpu15
  | | |-THREAD ID 0: cpu3
  | | \-THREAD ID 1: cpu15
  | |-CORE ID 2: cpu5 cpu17
  | | |-THREAD ID 0: cpu5
  | | \-THREAD ID 1: cpu17
  | |-CORE ID 8: cpu7 cpu19
  | | |-THREAD ID 0: cpu7
  | | \-THREAD ID 1: cpu19
  | |-CORE ID 9: cpu9 cpu21
  | | |-THREAD ID 0: cpu9
  | | \-THREAD ID 1: cpu21
  | \-CORE ID 10: cpu11 cpu23
  |   |-THREAD ID 0: cpu11
  |   \-THREAD ID 1: cpu23
  \-CHIP ID 1: cpu0 cpu2 cpu4 cpu6 cpu8 cpu10 cpu12 cpu14 cpu16 cpu18 cpu20
cpu22
    |-CORE ID 0: cpu0 cpu12
    | |-THREAD ID 0: cpu0
    | \-THREAD ID 1: cpu12
    |-CORE ID 1: cpu2 cpu14
    | |-THREAD ID 0: cpu2
    | \-THREAD ID 1: cpu14
    |-CORE ID 2: cpu4 cpu16
    | |-THREAD ID 0: cpu4
    | \-THREAD ID 1: cpu16
    |-CORE ID 8: cpu6 cpu18
    | |-THREAD ID 0: cpu6
    | \-THREAD ID 1: cpu18
    |-CORE ID 9: cpu8 cpu20
    | |-THREAD ID 0: cpu8
    | \-THREAD ID 1: cpu20
    \-CORE ID 10: cpu10 cpu22
      |-THREAD ID 0: cpu10
      \-THREAD ID 1: cpu22

And here are some tests. The differences are < 5% (but not so much):
############ enable smt ########
kern.usched_bsd4.smt_enable: 0 -> 1
tps = 53019.868091 (including connections establishing)
tps = 52814.820895 (including connections establishing)
tps = 53251.869806 (including connections establishing)
tps = 53914.301869 (including connections establishing)
tps = 53278.858660 (including connections establishing)
tps = 53044.933921 (including connections establishing)
tps = 53758.093953 (including connections establishing)
tps = 53965.776254 (including connections establishing)
tps = 53093.809461 (including connections establishing)
tps = 53322.645105 (including connections establishing)

############ disable smt ########
kern.usched_bsd4.smt_enable: 1 -> 0
tps = 51379.980647 (including connections establishing)
tps = 50960.834688 (including connections establishing)
tps = 51336.041880 (including connections establishing)
tps = 51311.336021 (including connections establishing)
tps = 51227.944502 (including connections establishing)
tps = 50828.181685 (including connections establishing)
tps = 51342.268742 (including connections establishing)
tps = 50887.898412 (including connections establishing)
tps = 50667.897897 (including connections establishing)
tps = 50960.282830 (including connections establishing)

--14dae934116f99a22a04c5fbba48
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello,<div><br></div><div>Here are some results from a AMD FX(tm)-8150 Eigh=
t-Core Processor(thanks profkmax):</div><div><br></div><div><div>##########=
## enable smt ########</div><div>kern.usched_bsd4.smt_enable: 0 -> 1</di=
v>
<div>tps =3D 32987.010952 (including connections establishing)</div><div>tp=
s =3D 33072.952733 (including connections establishing)</div><div>tps =3D 3=
2693.574568 (including connections establishing)</div><div>tps =3D 33084.27=
7648 (including connections establishing)</div>
<div>tps =3D 33481.054536 (including connections establishing)</div><div>tp=
s =3D 33013.296931 (including connections establishing)</div><div>tps =3D 3=
2711.982849 (including connections establishing)</div><div>tps =3D 32686.12=
0901 (including connections establishing)</div>
<div>tps =3D 32792.744933 (including connections establishing)</div><div>tp=
s =3D 33367.284545 (including connections establishing)</div><div><br></div=
><div>############ disable smt ########</div><div>kern.usched_bsd4.smt_enab=
le: 1 -> 0</div>
<div>tps =3D 31364.873850 (including connections establishing)</div><div>tp=
s =3D 31340.974524 (including connections establishing)</div><div>tps =3D 3=
1648.286265 (including connections establishing)</div><div>tps =3D 30913.78=
8400 (including connections establishing)</div>
<div>tps =3D 31338.052583 (including connections establishing)</div><div>tp=
s =3D 31360.521337 (including connections establishing)</div><div>tps =3D 3=
1545.915474 (including connections establishing)</div><div>tps =3D 31489.00=
8958 (including connections establishing)</div>
<div>tps =3D 30657.108291 (including connections establishing)</div><div>tp=
s =3D 31294.472379 (including connections establishing)</div><div><br></div=
><div>The difference is > 1500tps (5%).=A0</div><br><div class=3D"gmail_=
quote">
Here is an interesting CPU topology from a dual-socket XEON:</div></div><di=
v class=3D"gmail_quote"><div class=3D"gmail_quote">hw.cpu_topology.tree:</d=
iv><div class=3D"gmail_quote">\-PACKAGE MEMBERS: cpu0 cpu1 cpu2 cpu3 cpu4 c=
pu5 cpu6 cpu7 cpu8 cpu9 cpu10 cpu11 cpu12 cpu13 cpu14 cpu15 cpu16 cpu17 cpu=
18 cpu19 cpu20 cpu21 cpu22 cpu23</div>
<div class=3D"gmail_quote">=A0 |-CHIP ID 0: cpu1 cpu3 cpu5 cpu7 cpu9 cpu11 =
cpu13 cpu15 cpu17 cpu19 cpu21 cpu23</div><div class=3D"gmail_quote">=A0 | |=
-CORE ID 0: cpu1 cpu13</div><div class=3D"gmail_quote">=A0 | | |-THREAD ID =
0: cpu1</div>
<div class=3D"gmail_quote">=A0 | | \-THREAD ID 1: cpu13</div><div class=3D"=
gmail_quote">=A0 | |-CORE ID 1: cpu3 cpu15</div><div class=3D"gmail_quote">=
=A0 | | |-THREAD ID 0: cpu3</div><div class=3D"gmail_quote">=A0 | | \-THREA=
D ID 1: cpu15</div>
<div class=3D"gmail_quote">=A0 | |-CORE ID 2: cpu5 cpu17</div><div class=3D=
"gmail_quote">=A0 | | |-THREAD ID 0: cpu5</div><div class=3D"gmail_quote">=
=A0 | | \-THREAD ID 1: cpu17</div><div class=3D"gmail_quote">=A0 | |-CORE I=
D 8: cpu7 cpu19</div>
<div class=3D"gmail_quote">=A0 | | |-THREAD ID 0: cpu7</div><div class=3D"g=
mail_quote">=A0 | | \-THREAD ID 1: cpu19</div><div class=3D"gmail_quote">=
=A0 | |-CORE ID 9: cpu9 cpu21</div><div class=3D"gmail_quote">=A0 | | |-THR=
EAD ID 0: cpu9</div>
<div class=3D"gmail_quote">=A0 | | \-THREAD ID 1: cpu21</div><div class=3D"=
gmail_quote">=A0 | \-CORE ID 10: cpu11 cpu23</div><div class=3D"gmail_quote=
">=A0 | =A0 |-THREAD ID 0: cpu11</div><div class=3D"gmail_quote">=A0 | =A0 =
\-THREAD ID 1: cpu23</div>
<div class=3D"gmail_quote">=A0 \-CHIP ID 1: cpu0 cpu2 cpu4 cpu6 cpu8 cpu10 =
cpu12 cpu14 cpu16 cpu18 cpu20 cpu22</div><div class=3D"gmail_quote">=A0 =A0=
 |-CORE ID 0: cpu0 cpu12</div><div class=3D"gmail_quote">=A0 =A0 | |-THREAD=
 ID 0: cpu0</div>
<div class=3D"gmail_quote">=A0 =A0 | \-THREAD ID 1: cpu12</div><div class=
=3D"gmail_quote">=A0 =A0 |-CORE ID 1: cpu2 cpu14</div><div class=3D"gmail_q=
uote">=A0 =A0 | |-THREAD ID 0: cpu2</div><div class=3D"gmail_quote">=A0 =A0=
 | \-THREAD ID 1: cpu14</div>
<div class=3D"gmail_quote">=A0 =A0 |-CORE ID 2: cpu4 cpu16</div><div class=
=3D"gmail_quote">=A0 =A0 | |-THREAD ID 0: cpu4</div><div class=3D"gmail_quo=
te">=A0 =A0 | \-THREAD ID 1: cpu16</div><div class=3D"gmail_quote">=A0 =A0 =
|-CORE ID 8: cpu6 cpu18</div>
<div class=3D"gmail_quote">=A0 =A0 | |-THREAD ID 0: cpu6</div><div class=3D=
"gmail_quote">=A0 =A0 | \-THREAD ID 1: cpu18</div><div class=3D"gmail_quote=
">=A0 =A0 |-CORE ID 9: cpu8 cpu20</div><div class=3D"gmail_quote">=A0 =A0 |=
 |-THREAD ID 0: cpu8</div>
<div class=3D"gmail_quote">=A0 =A0 | \-THREAD ID 1: cpu20</div><div class=
=3D"gmail_quote">=A0 =A0 \-CORE ID 10: cpu10 cpu22</div><div class=3D"gmail=
_quote">=A0 =A0 =A0 |-THREAD ID 0: cpu10</div><div class=3D"gmail_quote">=
=A0 =A0 =A0 \-THREAD ID 1: cpu22</div>
<div><br></div><div>And here are some tests. The differences are < 5% (b=
ut not so much):</div><div><div>############ enable smt ########</div><div>=
kern.usched_bsd4.smt_enable: 0 -> 1</div><div>tps =3D 53019.868091 (incl=
uding connections establishing)</div>
<div>tps =3D 52814.820895 (including connections establishing)</div><div>tp=
s =3D 53251.869806 (including connections establishing)</div><div>tps =3D 5=
3914.301869 (including connections establishing)</div><div>tps =3D 53278.85=
8660 (including connections establishing)</div>
<div>tps =3D 53044.933921 (including connections establishing)</div><div>tp=
s =3D 53758.093953 (including connections establishing)</div><div>tps =3D 5=
3965.776254 (including connections establishing)</div><div>tps =3D 53093.80=
9461 (including connections establishing)</div>
<div>tps =3D 53322.645105 (including connections establishing)</div><div><b=
r></div><div>############ disable smt ########</div><div>kern.usched_bsd4.s=
mt_enable: 1 -> 0</div><div>tps =3D 51379.980647 (including connections =
establishing)</div>
<div>tps =3D 50960.834688 (including connections establishing)</div><div>tp=
s =3D 51336.041880 (including connections establishing)</div><div>tps =3D 5=
1311.336021 (including connections establishing)</div><div>tps =3D 51227.94=
4502 (including connections establishing)</div>
<div>tps =3D 50828.181685 (including connections establishing)</div><div>tp=
s =3D 51342.268742 (including connections establishing)</div><div>tps =3D 5=
0887.898412 (including connections establishing)</div><div>tps =3D 50667.89=
7897 (including connections establishing)</div>
<div>tps =3D 50960.282830 (including connections establishing)</div></div><=
div><br></div></div>

--14dae934116f99a22a04c5fbba48--





More information about the Kernel mailing list