[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 2/3] Introduce migration precopy policy



On 26/09/17 11:58, Andrew Cooper wrote:
On 25/09/17 19:55, Jennifer Herbert wrote:
+/*
+ * A precopy_policy callback may not be running in the same address
+ * space as libxc an so precopy_stats is passed by value.
+ */
Please take a step back and thing about what is written here...

As I've said repeatedly, the structure vs pointer argument here is
entirely unrelated to the IPC boundary.

I am also unhappy that, after multiple review requests saying "turn this
into a pointer", its remained being passed by value.  It is not ok to
hack things like this up simply because its the easier cause of action.

Passing tiny structures by value is not a hack - it is perfectly valid C. Bare in mind that a pointer is not a zero sized entity - it itself needs to be copied. Passing by value here is quite possibly faster, and use less memory. Furthermore, the multiple reviews concluded that this was related to IPC boundary, and that the tiny struct size was acceptable.

Maybe you could elaborate on why you do not think it is related to the IPC boundary.

Instead, we could pass each element of the structure, as an individual parameters. This would seem a retrograde
step to me, but  would address your sensitivities.

-jenny

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.