• J
    qemu: Add support for overriding max threads per process limit · d5572f62
    Jim Fehlig 提交于
    Some VM configurations may result in a large number of threads created by
    the associated qemu process which can exceed the system default limit. The
    maximum number of threads allowed per process is controlled by the pids
    cgroup controller and is set to 16k when creating VMs with systemd's
    machined service. The maximum number of threads per process is recorded
    in the pids.max file under the machine's pids controller cgroup hierarchy,
    e.g.
    
    $cgrp-mnt/pids/machine.slice/machine-qemu\\x2d1\\x2dtest.scope/pids.max
    
    Maximum threads per process is controlled with the TasksMax property of
    the systemd scope for the machine. This patch adds an option to qemu.conf
    which can be used to override the maximum number of threads allowed per
    qemu process. If the value of option is greater than zero, it will be set
    in the TasksMax property of the machine's scope after creating the machine.
    Signed-off-by: NJim Fehlig <jfehlig@suse.com>
    Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
    d5572f62
qemu_cgroup.c 37.8 KB