-
Notifications
You must be signed in to change notification settings - Fork 42
Conversation
Unfortunately unikernels which don't use any device drivers (no network, no block) fail to link because: - mirage-xen depends on xen-gnt - xen-gnt depends on io-page (to represent page mappings) - io-page needs either io-page-unix or io-page-xen (or mirage-solo5) to link Unfortunately we can't add io-page-xen as a dependency of xen-gnt because that code has to work on Unix as well as Xen. Unfortunately xen-gnt is a dependency of mirage-xen because of the need to inform the grant table code when the domain is suspended and resumed. If we can break the link between mirage-xen and xen-gnt then we can remove io-page-xen again. This will probably involve adding some kind of callback `pre_suspend` `post_resume` mechanism which `xen-gnt` can register with, if it is linked. As a temporary measure, this patch puts the io-page-xen back into mirage-xen. Signed-off-by: David Scott <dave@recoil.org>
Signed-off-by: David Scott <dave@recoil.org>
Signed-off-by: David Scott <dave@recoil.org>
Unfortunately unikernels which don't use any device drivers (no network, no block) fail to link because: - mirage-types-lwt is in the `common` set linked into all Unikernels - mirage-types-lwt depends on mirage-block-lwt and mirage-net-lwt - mirage-block-lwt depends on io-page - io-page needs either io-page-unix or io-page-xen (or mirage-solo5) to link Removing the dependency on io-page is a much bigger job than anticipated. Signed-off-by: David Scott <dave@recoil.org>
Signed-off-by: David Scott <dave@recoil.org>
thanks, might be worth to embed your reasoning from this PR into Changes or the code!? (it is hard to find this information once the PR is merged and closed) |
@hannesm will do, it was quite painful to discover this so I'm keen not to forget! At least we know what steps we need to take next. |
do we? from your comments, I'd follow that io-page is a very central library, and getting rid of it is not easily possible (unless we remove mirage-types-lwt from the game) -- or remove |
@hannesm I think you're right -- we should examine our interfaces to see where page alignment is necessary. I'd like to keep high performance zero copy possible, but it might be that in some (many?) cases (TCP with SSL?) it's a bit irrelevant since copy is mandatory anyway. Maybe Anyway, I'll persist my discoveries in the changes for easier re-parsing later. |
Signed-off-by: David Scott <dave@recoil.org>
On 16/06/2017 17:56, David Scott wrote:
@hannesm I think you're right -- we should examine our interfaces to
see where page alignment is necessary. I'd like to keep high
performance zero copy possible,
same here! and while looking through it, I guess crunch shouldn't be
page aligned (and use any io-page) at all (see the issue I opened at
mirage-kv repository).
but it might be that in some (many?)
cases (TCP with SSL?) it's a bit irrelevant since copy is mandatory
anyway.
in the end, it all depends who knows what.. if you're happy with TCP
knowing its layers below precisely statically (whether this is IPv4/IPv6
+ their headers + raw Ethernet, or via 802.1q VLAN tagged, or TCP + IP
over PPP, or the whole stack via an IPSec tunnel), zero-copy is easily
achievable. if this is more dynamic, some initialisation protocol is
needed to dynamically discover the offset.
Maybe `FLOW` should be unaligned by default but maybe raw
network/block would be aligned?
that may be worth discovering
|
Unfortunately unikernels which don't use any device drivers (no network, no block) fail to link because:
Unfortunately we can't add io-page-xen as a dependency of xen-gnt because that code has to work on Unix as well as Xen.
Unfortunately xen-gnt is a dependency of mirage-xen because of the need to inform the grant table code when the domain is suspended and resumed.
If we can break the link between mirage-xen and xen-gnt then we can remove io-page-xen again. This will probably involve adding some kind of callback
pre_suspend
post_resume
mechanism whichxen-gnt
can register with, if it is linked.As a temporary measure, this patch puts the io-page-xen back into mirage-xen.
Signed-off-by: David Scott dave@recoil.org