[Coco] nitros9 proposal - cache sector 0?

Aaron Wolfe aawolfe at gmail.com
Sat Jan 25 12:30:38 EST 2014


On Sat, Jan 25, 2014 at 12:23 PM, Gene Heskett <gheskett at wdtv.com> wrote:
> On Saturday 25 January 2014 12:14:14 Aaron Wolfe did opine:
>
>> Its often been noticed that sector 0 of an RBF filesystem gets
>> read/written an awful lot when doing nearly any disk I/O.  I've been
>> working on the dw server some this morning and am being reminded of
>> just how much.
>>
>> Would it be practical to cache this sector somewhere?  256 bytes is
>> not tiny, but also not impossible to find in the typical system page.
>> The logic for a simple write-through cache would not be very complex.
>>  I guess I'm looking to the experts for reasons this can't work or
>> should never be done before looking at how to do it :)  Any thoughts?
>>
>> -Aaron
>
> 1. Unless we've a huge bug, it's for reading only.  Off hand, I can only
> think of 3 programs that should write to LSN0, they are format, os9gen, and
> now my bootlink, plus any utility that opens the descriptor in raw mode,
> like "ded /d1@".
>
> 2. Its for making sure the same disk a file was opened on, is still in the
> drive before allowing a write.  The disk changed IRQ was not to my
> knowledge, ever made part of rbf.mn.
>
> 3.  So its not a great idea to cache it.
>
> So given that, do we still have a problem?
>

Not a problem, just what seems like (maybe) a way to make a
significant performance increase with just a little work.  With
DriveWire, it is terribly expensive to read a sector (monopolizes the
CPU for the entire operation) so to avoid it would be nice.  If it is
reasonable otherwise, I can ensure the disk changes are safe with a
little server magic.



More information about the Coco mailing list