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

remove memreport to Xen to avoid Qubes trying to get back some memory… #176

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

palainp
Copy link
Member

@palainp palainp commented May 26, 2023

… from us

Some qubes-mirage-firewall users have reported AppVMs being stuck at their lowmem value (https://forum.qubes-os.org/t/new-usability-issues-dom0-processes-making-system-unusable/18301/2 and https://forum.qubes-os.org/t/memory-allocation-problem-remains-in-low-allocation-for-minutes/18787). This causes the AppVMs to use swap and be very slow.

After some investigations (the issue appears when the system is under heavy memory pressure, a new AppVM is started and Qubes have to find memory). It seems that, when the meminfo key is set, the unikernel is considered by Qubes as taking part in the memory balancing process. Some VM have a meminfo entry, some haven't:

$ xenstore ls /local/domain/1/memory
static-max = "614400"
target = "598016"
videoram = "16384"
$ xenstore ls /local/domain/8/memory
static-max = "4096000"
target = "4079616"
videoram = "0"
meminfo = "966160"

I've tried, without any luck, to write in meminfo our total_mem (we always want to have our memory, we're currently unable to downsize our memory) but it differs from the actual total memory (meminfo="27384" vs static-max="32768", still no idea why). I then tried never writing to meminfo (this commit) which solve the issue (at least on my laptop and rrn in the qubes-forum, https://forum.qubes-os.org/t/memory-allocation-problem-remains-in-low-allocation-for-minutes/18787/20) and doesn't seem to have any drawback.

@xaki23
Copy link
Contributor

xaki23 commented Jul 4, 2023

build (through qubes builder) works,
unikernel works (basic functional tests only),
solves #177,
so lgtm, 👍

@hannesm
Copy link
Member

hannesm commented Jul 5, 2023

thanks a lot!

@hannesm hannesm merged commit a33bb5e into mirage:main Jul 5, 2023
@palainp palainp deleted the no-memreport branch July 30, 2023 19:10
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.

3 participants