> erik quanstrom wrote:
>>> I'm serving drives to WinXP64 via AOE with http://winaoe.org/

i've been ignoring this driver.  i'm worthless at windows.
(it's the small blessings, right?)  but now that i've taken
a look, i naively wonder about some things.

i think i see why syscalls take so long when a device has gone
missing.  the thread Thread (seems to be roughly a kproc?) doesn't
appear to have a sleep in it so it ends up grabbing spin locks all the
time.  this is going to be hell on performance.  without thinking very
hard about the problem, i think that spin lock could be made a QLock,
if such a concept exists in windows.  also, there should be a sleep
of 25ms or so to keep the sweeper thread from chewing cpu for no
reason.  AoERequest would then need to send its own requests or
kick Thread into action.  i would think this will have a big effect on
windows performance when a device is down, since it is effectively
running this in a tight loop:

        for(;;){
                KeAcquireSpinLock(&SpinLock, &Irql);
                KeQuerySystemTime(&CurrentTime);
                KeReleaseSpinLock(&SpinLock, Irql);
        }

it's pretty impressive that windows withstands this abuse at all.

another quirk i see is the way the outstanding requests are managed
doesn't appear to square with the standard.  this driver starts
declaring Tags failed if the number of outstanding requests is
>64.  (again in Thread.)  the number of outstanding tags needs to
be bounded by the maximum frames the aoe device allows and
if the driver itself has hit its limit, the io should sleep until there
is room in the queue.

- erik


Reply via email to