Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Mirage 4.5.0 #192

Closed
wants to merge 4 commits into from
Closed

Update to Mirage 4.5.0 #192

wants to merge 4 commits into from

Conversation

palainp
Copy link
Member

@palainp palainp commented Apr 20, 2024

Dear devs,
This PR wants to update to recent mirage API. In doing so it appears that Memory.quick_stat() reports wrong values (I haven't investigated why yet, and maybe it was present before, but now it goes lower than the limits in memory_pressure.ml EDIT: There was a bad computation in ocaml-solo5 again):

Memory.quick_stat() INF [memory_pressure] Writing meminfo: free 11MiB / 27MiB (39.99 %)
Memory.stat() INF [memory_pressure] Writing meminfo: free 19MiB / 27MiB (70.31 %)

With wrong values, the firewall starts to drop packets (Memory_critical being returned by Memory_pressure.status()). So I've replaced Memory.quick_stat() with Memory.stat(), but this is at the cost of going through the whole heap and Memory_pressure.status calls it for each packets. But I'd rather the firewall be slower than unusable :)

Going further will need to dive more into ocaml-solo5/nolibc/malloc.i as the bug seems to come from there but the code is really hard :'(
Best,

@palainp
Copy link
Member Author

palainp commented Apr 23, 2024

With mirage/ocaml-solo5#135 using quick_stat() is ok now so I removed the last modifications to have it back :)
EDIT: I'll force push the new Dockerfile and hashsum when ocaml-solo5 will be released.

@palainp
Copy link
Member Author

palainp commented Apr 23, 2024

Will be included in #178 .

@palainp palainp closed this Apr 23, 2024
config.ml Show resolved Hide resolved
package "mirage-logs";
package "mirage-xen" ~min:"8.0.0";
package ~min:"6.4.0" "dns-client";
package "dns-client" ~min:"6.4.0";
package "pf-qubes";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these argument reorderings needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it needed, this was just cosmetic to keep packages aligned.

@palainp
Copy link
Member Author

palainp commented Apr 23, 2024

Sorry I closed while you are reviewing it, I'll add your changes in #178.

@hannesm
Copy link
Member

hannesm commented Apr 23, 2024

@palainp thanks. no worries. :)

@palainp palainp deleted the mirage-4.5.0 branch May 10, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants