GSoC: Add SMT/HT awareness to DragonFlyBSD scheduler
Matt Emmerton
matt at gsicomp.on.ca
Tue Jun 26 18:41:27 PDT 2012
This is a multi-part message in MIME format.
------=_NextPart_000_0040_01CD53E4.71156990
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Mihai,
This is great stuff.
For the CPU topology option, are cbits/lbits values considered a mask (eg,
reserve N bits for core ID or thread ID), or are they the log2 of the
threads/core or cores/package that you want to simulate? If it's the
latter, then I envision problems attempting to simulate systems that don't
follow strict power-of-2 scaling (such as the AMD Phenom X6 that I'm writing
this on, with 6 cores/package.)
Regards,
--
Matt Emmerton
From: kernel-errors at crater.dragonflybsd.org
[mailto:kernel-errors at crater.dragonflybsd.org] On Behalf Of Mihai Carabas
Sent: Tuesday, June 26, 2012 10:24 AM
To: kernel at crater.dragonflybsd.org
Subject: Re: GSoC: Add SMT/HT awareness to DragonFlyBSD scheduler
Hello,
Last week I added a feature to be able to simulate a CPU topology within a
vkernel [1] (the lbits and cbits options). Also I had made tests on other
platforms (thanks Alex H. for running the tests) [2][3].
[1] root at dbsd_64:/var/vkernel# ./boot/kernel/kernel -h
Usage: ./boot/kernel/kernel [-hsUv] [-c file] [-e name=value:name=value:...]
[-i file] [-I interface[:address1[:address2][/netmask]]] [-l
cpulock]
[-m size] [-n numcpus[:lbits[:cbits]]]
[-p file] [-r file]
Arguments:
-c Specify a readonly CD-ROM image file to be used by the
kernel.
-e Specify an environment to be used by the kernel.
-h This list of options.
-i Specify a memory image file to be used by the virtual
kernel.
-I Create a virtual network device.
-l Specify which, if any, real CPUs to lock virtual CPUs to.
-m Specify the amount of memory to be used by the kernel in
bytes.
-n Specify the number of CPUs and the topology you wish to
emulate:
- numcpus - number of cpus
- :lbits - specify the number of bits within APICID(=CPUID)
needed for representing
the logical ID. Controls the number of threads/core (0bits
- 1 thread, 1bit - 2 threads).
- :cbits - specify the number of bits within APICID(=CPUID)
needed for representing
the core ID. Controls the number of core/package (0bits -
1 core, 1bit - 2 cores).
[2] http://bugs.dragonflybsd.org/pastes/407
[3] http://bugs.dragonflybsd.org/pastes/408
------=_NextPart_000_0040_01CD53E4.71156990
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 12 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Mihai,<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>This is great stuff.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>For the CPU topology option, are cbits/lbits values considered a mask =
(eg, reserve N bits for core ID or thread ID), or are they the log2 of =
the threads/core or cores/package that you want to simulate? If =
it's the latter, then I envision problems attempting to simulate systems =
that don't follow strict power-of-2 scaling (such as the AMD Phenom X6 =
that I'm writing this on, with 6 cores/package.)<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Regards,<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>--<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'>Matt Emmerton<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497=
D'><o:p> </o:p></span></p><div =
style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in =
0in 0in'><p class=3DMsoNormal><b><span =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span>=
</b><span style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'> =
kernel-errors at crater.dragonflybsd.org =
[mailto:kernel-errors at crater.dragonflybsd.org] <b>On Behalf Of </b>Mihai =
Carabas<br><b>Sent:</b> Tuesday, June 26, 2012 10:24 AM<br><b>To:</b> =
kernel at crater.dragonflybsd.org<br><b>Subject:</b> Re: GSoC: Add SMT/HT =
awareness to DragonFlyBSD scheduler<o:p></o:p></span></p></div><p =
class=3DMsoNormal><o:p> </o:p></p><p =
class=3DMsoNormal>Hello,<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p> </o:p></p></div><div><p =
class=3DMsoNormal>Last week I added a feature to be able to simulate a =
CPU topology within a vkernel [1] (the lbits and cbits options). Also I =
had made tests on other platforms (thanks Alex H. for running the tests) =
[2][3].<o:p></o:p></p></div><div><div><p =
class=3DMsoNormal><o:p> </o:p></p></div><div><p =
class=3DMsoNormal><o:p> </o:p></p></div><div><p =
class=3DMsoNormal>[1] root at dbsd_64:/var/vkernel# =
./boot/kernel/kernel -h<o:p></o:p></p></div><div><p =
class=3DMsoNormal>Usage: ./boot/kernel/kernel [-hsUv] [-c file] [-e =
name=3Dvalue:name=3Dvalue:...]<o:p></o:p></p></div><div><p =
class=3DMsoNormal> [-i file] [-I =
interface[:address1[:address2][/netmask]]] [-l =
cpulock]<o:p></o:p></p></div><div><p class=3DMsoNormal> =
[-m size] [-n =
numcpus[:lbits[:cbits]]]<o:p></o:p></p></div><div><p =
class=3DMsoNormal> [-p file] [-r =
file]<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p> </o:p></p></div><div><p =
class=3DMsoNormal>Arguments:<o:p></o:p></p></div><div><p =
class=3DMsoNormal> -c =
Specify a readonly CD-ROM image file to be used by the =
kernel.<o:p></o:p></p></div><div><p class=3DMsoNormal> =
-e Specify an environment to be used =
by the kernel.<o:p></o:p></p></div><div><p class=3DMsoNormal> =
-h This list of =
options.<o:p></o:p></p></div><div><p class=3DMsoNormal> =
-i Specify a memory image file to be =
used by the virtual kernel.<o:p></o:p></p></div><div><p =
class=3DMsoNormal> -I =
Create a virtual network device.<o:p></o:p></p></div><div><p =
class=3DMsoNormal> -l =
Specify which, if any, real CPUs to lock virtual CPUs =
to.<o:p></o:p></p></div><div><p class=3DMsoNormal> =
-m Specify the amount of memory to be used by =
the kernel in bytes.<o:p></o:p></p></div><div><p =
class=3DMsoNormal> -n =
Specify the number of CPUs and the topology you wish to =
emulate:<o:p></o:p></p></div><div><p class=3DMsoNormal> =
- numcpus - number of =
cpus<o:p></o:p></p></div><div><p class=3DMsoNormal> =
- :lbits - specify the number of bits =
within APICID(=3DCPUID) needed for =
representing<o:p></o:p></p></div><div><p class=3DMsoNormal> =
the logical ID. =
Controls the number of threads/core (0bits - 1 thread, 1bit - 2 =
threads).<o:p></o:p></p></div><div><p class=3DMsoNormal> =
- :cbits - specify the number =
of bits within APICID(=3DCPUID) needed for =
representing<o:p></o:p></p></div><div><p class=3DMsoNormal> =
the core ID. Controls =
the number of core/package (0bits - 1 core, 1bit - 2 =
cores).<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p> </o:p></p></div><p =
class=3DMsoNormal><o:p> </o:p></p><div><p =
class=3DMsoNormal>[2] <a =
href=3D"http://bugs.dragonflybsd.org/pastes/407">http://bugs.dragonflybsd=
.org/pastes/407</a><o:p></o:p></p></div></div><div><p =
class=3DMsoNormal>[3] <a =
href=3D"http://bugs.dragonflybsd.org/pastes/408">http://bugs.dragonflybsd=
.org/pastes/408</a><o:p></o:p></p></div></div></body></html>
------=_NextPart_000_0040_01CD53E4.71156990--
More information about the Kernel
mailing list