Skip to content
This repository has been archived by the owner on Oct 18, 2020. It is now read-only.

xen: link against io-page-xen again #191

Merged
merged 6 commits into from
Jun 16, 2017
Merged

xen: link against io-page-xen again #191

merged 6 commits into from
Jun 16, 2017

Conversation

djs55
Copy link
Member

@djs55 djs55 commented Jun 16, 2017

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

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>
@hannesm
Copy link
Member

hannesm commented Jun 16, 2017

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)

@djs55
Copy link
Member Author

djs55 commented Jun 16, 2017

@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.

@hannesm
Copy link
Member

hannesm commented Jun 16, 2017

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 Io_page.t from mirage-net-lwt/mirage-block-lwt (but we should re-think what really needs to be page-aligned on the interface level...) mirage/mirage-net-xen#17 was my motivation to lobby for moving all page aligned things to the fringe (device drivers)...

@djs55
Copy link
Member Author

djs55 commented Jun 16, 2017

@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 FLOW should be unaligned by default but maybe raw network/block would be aligned?

Anyway, I'll persist my discoveries in the changes for easier re-parsing later.

Signed-off-by: David Scott <dave@recoil.org>
@hannesm
Copy link
Member

hannesm commented Jun 16, 2017 via email

@djs55 djs55 merged commit afb4aab into mirage:master Jun 16, 2017
@djs55 djs55 deleted the xen-io-page branch June 16, 2017 17:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants