Hi Julien,
On 11.09.18 16:37, Julien Grall wrote:
Hi Volodymyr,
On 10/09/18 19:04, Volodymyr Babchuk wrote:
On 10.09.18 17:02, Julien Grall wrote:
On 03/09/18 17:54, Volodymyr Babchuk wrote:
[...]
+ if ( !pages_data_xen_start ) + return false;
+ shm_buf = allocate_shm_buf(ctx, param->u.tmem.shm_ref, num_pages);
In alocate_shm_buf you are now globally limiting the number of pages ( (16384) to pin. However, this does not limit per call.
With the current limit, you would could call up to 16384 times lookup_and_pin_guest_ram_addr(...). On Arm, for p2m related operation, we limit to 512 iterations in one go before checking the preemption. So I think 16384 times is far too much.
So, in other words, I can translate only 2MB buffer (if 4096KB pages are used), is it right?
2MB for the whole command. So if you have 5 buffer in the command, then the sum of the buffer should not be bigger than 2MB.
4 buffers, but yes, it can be up to 8MB. Okay, I'll add per-call counter to limit memory usage for a whole call.
However, 2MB might be too big considering that you also need to account the SMC call. Does buffer can be passed for fast call?
No, all such calls are yielding calls, so you can ignore time used for SMC call itself.