This app measures the cycle count for performing clearMemory operations
while resetting untyped objects. It performs 100 retyping operations of
a 4K sized untyped. Each retype after the first retype will cause the
kernel to clear the memory from the object via multiple calls to
clearMemory. clearMemory is an internal kernel function that resets the
memory of an untyped object in chunks that can be preempted. The chunk
size can be controlled by the KernelResetChunkBits option. The larger
the chunk size, the longer the kernel will take between preemption
points. This affects interrupt latency. However the less preemption
checking that the kernel does will result in retyping completing faster.
This behavior can be tuned via what KernelResetChunkBits gets set to.
The tradeoffs will be different on different platforms as clearMemory
will have different behavior based on the caching and memory
architecture of each platform the kernel is run on.
This app measures the cycle count for performing clearMemory operations while resetting untyped objects. It performs 100 retyping operations of a 4K sized untyped. Each retype after the first retype will cause the kernel to clear the memory from the object via multiple calls to clearMemory. clearMemory is an internal kernel function that resets the memory of an untyped object in chunks that can be preempted. The chunk size can be controlled by the KernelResetChunkBits option. The larger the chunk size, the longer the kernel will take between preemption points. This affects interrupt latency. However the less preemption checking that the kernel does will result in retyping completing faster. This behavior can be tuned via what KernelResetChunkBits gets set to. The tradeoffs will be different on different platforms as clearMemory will have different behavior based on the caching and memory architecture of each platform the kernel is run on.
Signed-off-by: Kent McLeod kent@kry10.com