[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 7/9] xen/arm: vgic: Optimize the way to store the target vCPU in the rank
On 06/10/15 14:59, Ian Campbell wrote: > On Mon, 2015-10-05 at 13:51 +0100, Julien Grall wrote: >> Xen is currently directly storing the value of GICD_ITARGETSR register >> (for GICv2) and GICD_IROUTER (for GICv3) in the rank. This makes the >> emulation of the registers access very simple but makes the code to get >> the target vCPU for a given vIRQ more complex. >> >> While the target vCPU of an vIRQ is retrieved every time an vIRQ is >> injected to the guest, the access to the register occurs less often. >> >> So the data structure should be optimized for the most common case >> rather than the inverse. >> >> This patch introduces the usage of an array to store the target vCPU for >> every interrupt in the rank. This will make the code to get the target >> very quick. The emulation code will now have to generate the >> GICD_ITARGETSR >> and GICD_IROUTER register for read access and split it to store in a >> convenient way. >> >> With the new way to store the target vCPU, the structure vgic_irq_rank >> is shrinked down from 320 bytes to 92 bytes. This is saving about 228 > > "shrunk" > >> bytes of memory allocated separately per vCPU. >> >> Note that with these changes, any read to those registers will list only >> the target vCPU used by Xen. This is fine because the GIC spec doesn't >> require to return exactly the value written and it can be seen as if we >> decide to implement the register read-only. > > I'd prefer if instead of "this is fine..." this said something like "We > think this is likely to be OK because...(stuff)...". Will do. I will resend the whole series fixing the different error you mentioned within the series and add your various acked. Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |