[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 09/13] optee: add support for arbitrary shared memory
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: [...] 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.So, in other words, I can translate only 2MB buffer (if 4096KB pages are used), is it right?+ 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.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. 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. -- Volodymyr Babchuk _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |