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-err...@crater.dragonflybsd.org [mailto:kernel-err...@crater.dragonflybsd.org] On Behalf Of Mihai Carabas Sent: Tuesday, June 26, 2012 10:24 AM To: kernel@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@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