emulate a ringbuffer

We may end up patching the prefetch value to a correct calucated
one later on but for the moment it seems to work.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>