Here it is the link to the article that I've shown at Microelectronic Congress 2011, Faculty of Engineering, University of La Plata, Argentina. The only thing is it is in spanish. It talks about TORO project and it shows a benchmarks that I made for my graduated project. Enjoy!
Matias E. Vara
www.torokernel.org
Monday, April 30, 2012
Toro's article in Microelectronic Congress
Etiquetas:
atomic operations,
kernel,
linux,
locks,
multiprocessing,
NUMA,
SMP,
threading cooperative,
windows,
x86,
x86-64
Tuesday, January 03, 2012
IOAPIC supported!
Until the latest TORO's source, I was using 8259 controller to catch interrupts, but the problem was all the interrupts were captured by the Boot Strap Processor (or core #0). This is not agree with the dedicate hardware model.
In this way, I have started to use the IOAPIC instance of 8259 when TORO runs in a multicore environment. Thus, I can redirect the IRQ to the core where the hardware was dedicated. The dedication must be performed by the user.
This is a new step toward a real multicore kernel.
Matias E. Vara
www.torokernel.org
Monday, December 12, 2011
Fixed an important bug in emigrate procedure
That's just a brief post about a recent change in the way that Toro migrates threads.
Previously, when a Thread running in core #0 wanted create a new Thread in core #1, function ThreadCreate allocated the TThread structure, TLS and the Stack then, It migrated the whole TThread structure to the core #1.
The main problem in this mechanism was that all memories block were allocated in parent core. This is a serious infraction in the NUMA model: TThread, TLS and the Stack are not already local memory.
Thus, I rewrote the way that Threads are migrated. When a Thread wants to create a new one remotely, Toro still invokes ThreadCreate BUT it is executed in the remote core. Instance of migrate the TThread structure, now Toro migrates a set of arguments to be passed toward ThreadCreate. When ThreadCreate finishes, the parent thread retrieve the TThreadID value or nil if it fails.
As we can see, while a local thread is made immediately when ThreadCreate is invoked, a remote thread spend two steps of latency: one for migrate the parameters and other for retrieve the result.
Matias E. Vara
www.torokernel.org
Thursday, August 25, 2011
Patching GDB 7.3 for QEMU remote kernel debug
This time I will try to explain how patch GDB 7.3 in order to debug a kernel using QEMU through remote debuging. If we try to debug remotely, we'll find a error message like:
Remote packet too long: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ...
I am not sure about problem but I suppose it's about register size. When the virtual machine jumps from real mode to long/protect mode, the register size changes but GDB doesn't know that. Thus, when GDB receives a bigger packet than it expects, it fails. Therefore, The patch just increments the buffer in those cases.
The first step is to download GDB 7.3 from http://www.gnu.org/s/gdb/download/, I've implemented the patch on 7.3 version but I think it works in oldest too.
Once downloaded and uncompressed, edit the file gdb-7.3/gdb/remote.c and go to 5693 line. That's the process_g_packet procedure. Now, look for and replace the original source with the following lines:
/* Further sanity checks, with knowledge of the architecture. */
//if (buf_len > 2 * rsa->sizeof_g_packet)
// error (_("Remote 'g' packet reply is too long: %s"), rs->buf);
if (buf_len > 2 * rsa->sizeof_g_packet)
{
rsa->sizeof_g_packet = buf_len;
for (i = 0; i < gdbarch_num_regs (gdbarch); i++)
{
if (rsa->regs[i].pnum == -1)
continue;
if (rsa->regs[i].offset >= rsa->sizeof_g_packet)
rsa->regs[i].in_g_packet = 0;
else
rsa->regs[i].in_g_packet = 1;
}
}
Finally, it just remains to execute:
$ ./configure
$ make
In some systems may be necessary to install termcap library, simply execute:
$ sudo apt-get install libncurses5-dev
In some systems may be necessary to install termcap library, simply execute:
$ sudo apt-get install libncurses5-dev
After compilation, the binary could be found in gdb-7.3/gdb/gdb, It must be enough to run GDB correctly.
Matias E. Vara
www.torokernel.org
Subscribe to:
Posts (Atom)