comments interspersed below.........
Drew Northup, N1XIM
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Kevin Lawton
> Sent: Saturday, December 30, 2000 4:20 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [plex86] initial write cache
>
>
> [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.
Hey bud,....... then we might as well write this all in assembly. Anyhow,
the STL code isn't really that dreadfully inefficient as far as code that
I've dealt with goes--it is just some really nasty messy f---ed up code.
Yes it is inefficient (thank God that they used rb_tree and not something
else however), but nobody here has attempted to hang you yet for your horrid
use of globals (in a C++ file--yuck!!!) either. As was mentioned
earlier--lets just get the damned thing to work first--ok?
>
> 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.
Yes, that is true--and is just fine. In any case--if you don't want
classes, then just don't use C++ code--period--and then put up with the
headaches later. As for the OS level stuff--there is some that MUST be in C
and not C++, but again, that can be easily dealt with.
>
> 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/
>