Skip to content

Fix error in zram-generator.conf.example#240

Open
Atrate wants to merge 3 commits intosystemd:mainfrom
Atrate:patch/example
Open

Fix error in zram-generator.conf.example#240
Atrate wants to merge 3 commits intosystemd:mainfrom
Atrate:patch/example

Conversation

@Atrate
Copy link
Copy Markdown

@Atrate Atrate commented Feb 26, 2026

At least on my system, xenstore-read always returns values in KiB, not MiB. This lead to an error in the example config. This PR also simplifies the xenstore-read call with a shorthand, thanks to @marmarek for that idea.

`xenstore-read` returns values in KiB, at least for this key.

Signed-off-by: Atrate <Atrate@protonmail.com>
…ility does

Signed-off-by: Atrate <Atrate@protonmail.com>
Signed-off-by: Atrate <Atrate@protonmail.com>
@Atrate
Copy link
Copy Markdown
Author

Atrate commented Apr 17, 2026

Additionally, it may be a good idea to change hotplug-max to static-max, as HVMs only have the latter while PVHs have both.

@marmarek
Copy link
Copy Markdown

Additionally, it may be a good idea to change hotplug-max to static-max, as HVMs only have the latter while PVHs have both.

But those are not equivalent. static-max is a max value you can reach when using balloon driver, and hotplug-max is max you can reach with memory hotplug. If memory hotplug is enabled, usually it's used instead of balloon, so static-max just means the current allocation (or max usage since startup) - not the actual max value.

What you see is Qubes OS defaults: PVH uses hotplug, but HVM does not. And also, most use of HVM (at least by default) is for PCI devices, which also makes it not really compatible with any kind of dynamic memory management, so in that case you can as well take the size Linux sees at boot, not some Xen-specific value, as it won't change at runtime.

@Atrate
Copy link
Copy Markdown
Author

Atrate commented Apr 17, 2026

As far as I'm reading this, then, there will not be one solution for each type of Qubes/Xen VM. Let's leave the example as-is, this got too Xen-specific for this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants