[EMAIL PROTECTED] wrote:
> 
> Hi Kevin,
> 
> I implemented an implementation for the write cache.
> I used C++, I hope you don't mind because bochs
> also has C++ code.
> 
> Implementing the cache with the C++ map container was real easy.

And thus likely inefficient.  If you didn't have to sit down
and think for a while on how to squeeze every drop of performance
out of the cache, then I'm guessing its not optimal.

C++, STLs, and other higher level language tools might be great
for abstraction, code reuse and such.  But you can throw all that
sh*t out the window when you're designing a piece of software
that has to consider every extra cycle a waste.

If you're going to use non-optimal code anywhere, you certainly
wouldn't put it in a high use component like the sector cache,
where every byte of disk data is channeled.

I appreciate the effort.  But as was the decision some time
ago, we're coding in C.  The bochs plugin is in C++ because
the bochs device code is in C++ and it was easier
not to change it so we could get something working.

BTW, are you handling multiple sectors properly?


> so the plugin knows the mapping of fd's to diskimage files.
> This is needed for e.g. persistant caching and perhaps other caching
> options ?

Yeah, I was thinking something similar.  We can add that.

-Kevin

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Kevin Lawton                        [EMAIL PROTECTED]
MandrakeSoft, Inc.                  Plex86 developer
http://www.linux-mandrake.com/      http://www.plex86.org/

Reply via email to