On 03.05.19 18:30, João Reis wrote:
Hello everyone,
I am trying to synchronize inmates using uio_ivshmem driver, but the synchronization
requires calling functions such as blocking read (to receive interrupt) or writing to
mapped memory registers such as Doorbell (to send interrupt) on linux side. This
synchronization code will likely "pollute" the cache. I want to know if there
is a way, or if jailhouse provides a way, to execute these few lines of code (calling
blocking read and writing to doorbell) without using the cache.
I've noticed that in the non-root cell side, we can use uncacheable memory by
passing MAP_UNCACHED as argument to map_range(), but in the root cell side i
didn't find a way to do this.
If you are behind cache isolation, you likely also want to take a look at the
recently posted cache coloring patches. However, they also have no answer yet
regarding the cache impact of operations that trigger guest exits into the
hypervisor, like that doorbell write or the interrupt reception on the target
side.
If you want to avoid such disturbances, communicate by polling: Check the shared
memory content periodically, e.g. as part of your main loop, and maybe do
timer-driven polling on the Linux side. However, you do not want to access the
shared memory uncached as that will only slow-down your work.
Jan
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.