[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
reactive IOS and dirty flag in PVM values
From: |
Jose E. Marchesi |
Subject: |
reactive IOS and dirty flag in PVM values |
Date: |
Mon, 16 Sep 2024 18:06:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi David, all.
In our discussion in Cauldron we talked about
ios_register_range (VAL, IOS, BEGIn, SIZE)
Called from ioregval PVM instruction generated by the compiler
(array_mapper and struct_mapper in pkl-gen.pks) or via the ioregval
Poke function in pkl-rt.pk.
ios_deregister_range (VAL)
Called via the GC finalization handler when VAL is no longer
referred by any live lexical frame or PVM instruction.
When ios_write_* writes in some range, the internal ranges table is
traversed and every value whose range covers the written addresses shall
get remapped.
But the remap of these values should _not_ occur immediately: this would
be very slow and most of these remaps may not be necessary at all. I
think it would be better to add a "dirty_p" flag to struct pvm_mapinfo in
pvm-val.h:
struct pvm_mapinfo
{
int dirty_p;
int mapped_p;
int strict_p;
pvm_val ios;
pvm_val offset;
};
ios_write_* then would just set the dirty_p flag in every value whose
range is impacted. Then the existing REMAP macro instruction, that the
compiler is already generated in the needed places, can just look for
the flag (we will need a new PVM instruction to check for the dirty flag
in the given PVM value in the stack) and do the remap only if the flag
is set.
WDYT?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- reactive IOS and dirty flag in PVM values,
Jose E. Marchesi <=