Hey Matthew, thanks for bringing this discussion to the wider SRU team. Before addressing those concerns I want to clarify that this patch only affects the size/behavior of the idle coroutine pool (see CONFIG_COROUTINE_POOL). Without CONFIG_COROUTINE_POOL, QEMU allocates coroutines on demand and deallocates them when they are no longer necessary. That still happens with CONFIG_COROUTINE_POOL; it’s just that coroutines might be reused instead of deallocated & reallocated.
This means that a QEMU process consumes at least as many VMAs as concurrently active coroutines (with no limit), regardless of any of the patches discussed here. 1) Given the above, there should be no situation where a VM is unstartable due to vm.max_map_count, with or without the patch. The patch only tweaks the growth of allocated VMAs as a VM spins concurrent coroutines. 2) The only indication that a user has exceeded the limit is the log message given in the impact statement. There is no warning for “getting close”. 3) Yes, the idle coroutine pool max size would be (UINT_MAX / 4) without the AppArmor patch. However, the behavior we’ve observed with 86a637e4 (test plan part 3) is a lower number of total allocated VMAs (since the thread-local pools are limited to 128 coroutines). Changing the idle pool max size is likely insignificant in comparison to the improved caching behavior--the average number of idle coroutines is lower despite the increased max size in the new implementation. 4) We could revert upstream 4c41c69e05fe28c, which would have the effect of capping the idle coroutine pool size to 64. This could produce a performance regression for some users, as the performance bottleneck of this cap was significant enough for the change to be contributed upstream in the first place. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2168803 Title: QEMU 8.2.2 guests crash by exhausting vm.max_map_count with coroutines To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2168803/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
