xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-4.11 0/2] xenstore: reduce use of unsafe conversions
@ 2018-05-31 13:05 Marcello Seri
  2018-05-31 13:05 ` [PATCH for-4.11 1/2] ocaml/libs/xb: use bytes in place of strings for mutable buffers Marcello Seri
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Marcello Seri @ 2018-05-31 13:05 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, Marcello Seri, Christian Lindig

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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-06-01 18:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-31 13:05 [PATCH for-4.11 0/2] xenstore: reduce use of unsafe conversions Marcello Seri
2018-05-31 13:05 ` [PATCH for-4.11 1/2] ocaml/libs/xb: use bytes in place of strings for mutable buffers Marcello Seri
2018-05-31 13:05 ` [PATCH for-4.11 2/2] ocaml/xenstored: reduce use of unsafe conversions Marcello Seri
2018-05-31 14:14 ` [PATCH for-4.11 0/2] xenstore: " Juergen Gross
2018-05-31 14:49   ` Andrew Cooper
2018-05-31 15:29     ` Juergen Gross
2018-05-31 15:49       ` Christian Lindig
2018-05-31 16:41       ` Marcello Seri
2018-06-01 18:54 ` Juergen Gross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).