[directfd] Add track cache debug code to directfd driver #2081
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in Mellvik/TLVC#88 (comment), this tooling is show track cache performance when copying files between floppy drives.
Fixes num_sector calculation in DF driver resulting in previously incorrect calculation of emulated delay when IODELAY.
Adds drive number to TR/RD/WR debug display.
Displays request queue size when DEBUG_CACHE and queue length > 1.
Adds debug=N option to /bootopts allowing for multilevel debug display.
Adds debug_cache2 when debug=2 for CH/BM/L1/L2 track cache display.
Removes auto-probe message in DF driver when not actually probing.
During cache testing between drives, it was found that full track cache switching between drives is not causing any noticeable performance delays, contrary to what I had thought. What is happening is that during a file copy, the system track reads, quickly gaining access to contiguous file sectors, while buffer writes end up going into the kernel L2 system buffers, with no I/O scheduled at all. So no track cache switching to speak of. After the system buffers become full, sync_buffers() is called which schedules the write I/O. When the async DF driver is in use, this ends up initially quickly queuing 9 request headers, but which apparently are quickly dequeued, and multiple request headers aren't used again. Not sure why this is occurring yet.
Ultimately, both the BIOS and DF drivers are showing fairly good performance on both boot times and multi drive copies. A previous num_sector bug caused the IODELAY emulated delay to be incorrect for the DF driver, and we're now seeing boot times of 4.5 secs for BIOS and 5.0 secs for DF, very close. Both are half of what they used to be, so progress is looking good.