[Info-vax] OpenVMS async I/O, fast vs. slow
Johnny Billquist
bqt at softjar.se
Wed Nov 8 08:25:33 EST 2023
On 2023-11-08 01:23, Arne Vajhøj wrote:
> On 11/7/2023 11:27 AM, Johnny Billquist wrote:
>> On 2023-11-07 01:18, Arne Vajhøj wrote:
>>> On 11/6/2023 6:31 AM, Johnny Billquist wrote:
>>>> Read ahead is something that the system can easily do both for
>>>> normal I/O and memory mapped I/O. It's just a question of
>>>> speculative reads assuming some pattern by the program. Most
>>>> commonly that you are reading files sequentially from start to finish.
>>>
>>> $QIO(w) and $IO_PERFORM(W) could.
>>>
>>> But at least for $QIO(W) then I would be very surprised if it did. It is
>>> from before VIOC/XFC so originally it did not have anywhere to
>>> store read ahead data. VMS engineering could have changed
>>> behavior when VIOC/XFC was introduced. But I doubt it.
>>>
>>> $IO_PERFORM(W) maybe. But I think the spirit is still
>>> "do exactly what the developer asked for and nothing more".
>>
>> I'd say memory mapped I/O falls in the exact same category here.
>
> Not exact.
>
> $QIO(W) and $IO_PERFORM(W) read means read these X bytes
> now and write means write these X bytes now.
>
> $CRMPSC and memory access read means read at least
> these X bytes now and write means write these X bytes
> either when convenient or when explicit flushed/deleted.
Of course. But I was talking/thinking in the context of read ahead.
But you could also say that with QIO, it's "read these X bytes now",
while with MMAP, it will be read these X bytes when I try to access
them. As for writing back, with QIO, it's "write these X bytes now", but
with MMAP it's a question of write when the kernel wants/needs. There is
no real write request.
QIO would normally run through disk caches, so read ahead is very
possible to happen. But for sure, there is no guarantee. Same story with
MMAP, except I doubt it would run through any disk cache. But you could
possibly have the memory subsystem perform read aheads. But at the same
time, that would risk causing a bad memory pressure, with a negative impact.
Johnny
More information about the Info-vax
mailing list