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

[Xen-devel] [PATCH for-4.11 0/2] xenstore: reduce use of unsafe conversions



When xenstore was updated to support safe-string, some unnecessary
copies were introduced. A further patch reduced the copies at the price
of many calls to unsafe conversions between bytes and strings. In the
port we also did not notice that some C stubs were still incorrectly
using ocaml strings as mutable payload.

This set of patches updates the C stubs that use mutable payloads passed
from ocaml, and reduces the amount of unsafe conversions where possible
without further increasing the number of copies.

This seems also to fix some unclear instabilities that appeared after
the former patch introducing the unsafe conversion with some version of
the ocaml compiler.

Marcello Seri (2):
  ocaml/libs/xb: use bytes in place of strings for mutable buffers
  ocaml/xenstored: reduce use of unsafe conversions

 tools/ocaml/libs/xb/xb.ml        | 12 +++++-------
 tools/ocaml/libs/xb/xb.mli       |  2 +-
 tools/ocaml/libs/xb/xs_ring.ml   | 12 +++++++-----
 tools/ocaml/xenstored/logging.ml | 16 ++++++----------
 tools/ocaml/xenstored/stdext.ml  |  2 +-
 tools/ocaml/xenstored/utils.ml   |  9 ++++-----
 6 files changed, 24 insertions(+), 29 deletions(-)

-- 
2.17.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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