Michal Privoznik
5670c50ffb
qemu_domain: Increase memlock limit for NVMe disks
...
When starting QEMU, or when hotplugging a PCI device QEMU might
lock some memory. How much? Well, that's an undecidable problem.
But despite that, we try to guess. And it more or less works,
until there's a counter example. This time, it's a guest with
both <hostdev/> and an NVMe <disk/>. I've started a simple guest
with 4GiB of memory:
# virsh dominfo fedora
Max memory: 4194304 KiB
Used memory: 4194304 KiB
And here are the amounts of memory that QEMU tried to lock,
obtained via:
grep VmLck /proc/$(pgrep qemu-kvm)/status
1) with just one <hostdev/>
VmLck: 4194308 kB
2) with just one NVMe <disk/>
VmLck: 4328544 kB
3) with one <hostdev/> and one NVMe <disk/>
VmLck: 8522852 kB
Now, what's surprising is case 2) where the locked memory exceeds
the VM memory. It almost resembles VDPA. Therefore, treat is as
such.
Unfortunately, I don't have a box with two or more spare NVMe-s
so I can't tell for sure. But setting limit too tight means QEMU
refuses to start.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2014030
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2023-04-20 08:37:22 +02:00
..
2022-09-21 12:02:40 +01:00
2023-02-14 13:59:45 +01:00
2023-02-14 13:59:45 +01:00
2022-12-01 14:22:39 +01:00
2022-11-08 21:45:02 +01:00
2023-04-18 08:54:49 -06:00
2023-03-06 20:55:49 +01:00
2022-08-04 09:04:07 +02:00
2023-03-10 11:01:42 -07:00
2022-11-01 13:07:20 +01:00
2022-09-01 13:11:09 +02:00
2022-11-02 09:26:03 +01:00
2023-04-18 08:55:25 -06:00
2023-04-03 09:19:06 +02:00
2022-09-01 13:11:09 +02:00
2023-03-22 13:49:53 +01:00
2023-04-03 09:19:07 +02:00
2023-04-03 09:19:07 +02:00
2023-04-03 09:19:07 +02:00
2023-04-20 08:37:22 +02:00
2022-08-11 15:13:55 +02:00
2023-03-16 15:19:36 +01:00
2023-04-18 15:52:30 +02:00
2023-04-12 18:03:21 +02:00
2022-11-03 09:19:54 +01:00
2022-09-01 13:11:09 +02:00
2022-09-01 13:11:09 +02:00
2022-09-01 13:11:09 +02:00
2022-09-01 13:11:09 +02:00
2023-04-06 12:48:22 +02:00
2023-03-15 12:46:21 +01:00
2023-01-02 20:39:09 +01:00
2022-08-25 13:27:04 +02:00
2023-03-10 11:02:02 -07:00
2022-08-25 13:27:04 +02:00
2022-09-07 12:06:18 +02:00
2022-11-09 18:22:47 +01:00
2023-02-14 13:59:45 +01:00
2022-12-01 17:24:31 +01:00
2023-03-06 20:55:50 +01:00
2023-04-03 09:19:06 +02:00
2023-04-03 10:51:17 +02:00
2022-12-01 14:22:39 +01:00
2022-08-04 09:04:07 +02:00
2022-11-11 08:10:34 -07:00
2023-03-10 11:01:42 -07:00
2023-04-18 12:55:47 +02:00
2022-11-09 18:22:47 +01:00
2022-10-06 10:54:25 +02:00
2022-10-06 10:54:25 +02:00
2022-10-06 10:54:25 +02:00
2022-11-01 13:07:20 +01:00
2022-11-01 13:07:20 +01:00
2022-12-01 14:22:39 +01:00
2022-10-06 10:54:25 +02:00
2023-01-20 22:09:34 +01:00
2022-12-01 14:22:39 +01:00
2022-11-08 12:10:50 +01:00
2023-03-17 15:36:36 +01:00
2023-04-03 09:19:06 +02:00
2023-04-03 09:19:06 +02:00
2023-04-03 09:19:07 +02:00
2022-09-01 13:11:09 +02:00
2023-03-22 13:49:53 +01:00
2023-04-03 09:19:07 +02:00
2023-04-20 08:37:22 +02:00
2023-04-03 09:19:06 +02:00
2023-01-09 13:32:44 +01:00
2022-12-23 14:48:31 +01:00
2023-03-06 20:55:50 +01:00
2023-03-06 20:55:50 +01:00
2023-03-15 12:46:36 +01:00
2023-04-18 15:52:30 +02:00
2023-04-12 18:03:21 +02:00
2023-03-03 13:52:37 +01:00
2022-10-06 10:54:24 +02:00
2022-12-12 10:36:13 +00:00
2023-03-06 20:55:50 +01:00
2022-12-01 14:22:39 +01:00
2022-10-06 10:54:24 +02:00
2022-10-06 10:54:24 +02:00
2022-10-06 10:54:24 +02:00
2022-10-06 10:54:24 +02:00
2023-03-06 14:35:35 +01:00
2023-03-03 13:52:37 +01:00
2023-03-06 20:55:50 +01:00
2023-04-11 10:08:33 +02:00
2023-04-03 09:19:07 +02:00
2022-08-01 10:24:34 +02:00
2023-04-03 09:19:07 +02:00
2023-04-03 09:19:06 +02:00
2022-12-01 14:22:39 +01:00
2023-04-06 12:48:22 +02:00
2023-03-13 13:29:07 +01:00
2022-12-01 14:22:39 +01:00
2022-10-19 16:32:14 +02:00
2023-03-03 13:52:37 +01:00
2023-04-03 08:21:27 +02:00
2023-04-01 11:40:35 +02:00
2022-12-12 10:36:13 +00:00
2023-04-04 10:52:15 +02:00
2022-09-30 15:38:47 +02:00
2023-03-03 13:52:37 +01:00
2022-12-01 14:22:39 +01:00
2022-12-01 14:22:39 +01:00
2022-11-21 15:49:36 +01:00
2023-01-02 20:39:09 +01:00
2022-12-01 14:22:39 +01:00
2022-12-01 14:22:39 +01:00
2023-03-13 13:29:07 +01:00
2022-12-01 14:22:39 +01:00
2022-11-21 15:36:08 +01:00
2022-11-21 15:36:08 +01:00
2022-10-06 10:54:24 +02:00
2023-03-15 12:46:21 +01:00
2022-10-06 10:54:24 +02:00
2023-03-03 13:52:37 +01:00
2022-11-03 09:19:54 +01:00
2022-12-07 14:33:28 +01:00
2022-12-01 14:22:39 +01:00
2023-02-08 16:50:45 +01:00
2022-08-25 13:27:04 +02:00
2022-08-25 13:27:04 +02:00