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

Re: [MiNT] XaAES sources for FreeMiNT 1.16.3



>> Having the VDI as a kernel module so the AES can call it directly will be
>> a huge benefit performance-wise.
>
> Could someone tell us why making the VDI would be such a performance gain?

Well, any way of bypassing the normal calling method would be that,
for certain things.
If you look at the original fVDI plans, you'll see how I intended to
implement such a new calling convention.

> But why the VDI would have to be a kernel module ? Most of its work is to
> draw in the video memory, there is no need to switch to supervisor mode and
> play with the hardware or kernel internals to do that...

IMO, it should never be possible for a user program/library to write
directly to video memory. In the general case that may not even be
physically possible.
Drivers for graphics accelerators will need to access hardware
registers and, unless I'm mistaken, the NatFeat instructions necessary
for accelerated graphics under ARAnyM do not work in user mode.

You also need to consider that the VDI would sometimes be really
unhappy if called from multiple contexts at once. So, you'd need
kernel based locking for at least some things.
Also, even a driver for the normal Atari bitplane modes could fail to
work properly if called from several places at once (if it was
optimized using shadow buffers, for example).

There's also the matter of memory allocations made by the VDI and what
to do when an application crashes. Without being a kernel modules, I
don't believe it is possible to handle this properly.

/Johan