[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [SOURCES] qemu refactoring - osdep.c and tools.c

From: Juergen Pfennig
Subject: [Qemu-devel] [SOURCES] qemu refactoring - osdep.c and tools.c
Date: Tue, 7 Feb 2006 21:02:35 +0100
User-agent: KMail/1.7.2

my little qemu project (I name it qemu-xp and will report on it
later) has reached it's starting point. Unfortunately these 
"preparations" are so interesting they might be helpfull for users.
Such an important but trivial thing is to make the clock in windows
go right (now also with speed-step). 

Currently I still run tests with win2003. My VM runs as a batch on
a server using an Atlon 3000. Access to that VM is via win terminal
server and rdesktop as client. This configuration runs better than
expected. Next test will be to let the WUS server run on this VM.

As you know one of the key things was async IO and async SDL (other-
wise windows does not run smootly). Another one are "optimisations" in
timer handling. The qemu-xp project would add a lot of code to make
qemu easier (and a little faster) to use in production environments.
So I decided to "refactor" the code while I was programming new stuff.
This currently causes problems in submitting reasonable patches. So
here is some source code that might be needed for my patches.

(1) osdep.c|h  This layer seems to be required to prevent TLS and 
    mmap usage from glib. The code was completely unreadable due
    to too many #ifdef - I added comments and indentations. Also
    some malloc stuff was migrated to #defines in order to avoid
    trivial wrapper functions (they are still there and can be ena-
    bled). A new function qemu_mresize() was added. It is intended
    for dynamic arrays - and dyn arrays are faster than malloc'ed 
    lists under some circumstances in systems that run under high
    memory pressure (VMs always will).

(2) tools.c is a new file and will collect all the little helpers
    that are scattered through qemu. I would move helper functions
    and the typically #ifdef'ed stuff like Wait(n)/usleep(n*1000)
    into this file. Currently qemu_set_errno() may find your atten-

To say it again: Currently I did some preparations for the real
work, but the real work has not yet begun!

Yours Juergen

Attachment: refactoring.tar.gz
Description: application/tgz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]