Re: [PATCH 4/6] qemu: Reduce memlock limit after detaching hostdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2015-11-18 at 16:17 +0100, Peter Krempa wrote:
> > +    /* QEMU might no longer need to lock as much memory, eg. we just detached
> > +     * a VFIO device, so adjust the limit here */
> > +    if (qemuDomainRequiresMlock(vm->def))
> > +        if (virProcessSetMaxMemLock(vm->pid,
> > +                                    qemuDomainGetMlockLimitBytes(vm->def)) < 0)
> > +        VIR_WARN("Failed to adjust locked memory limit");
> > +
> 
> Hmmm, looks like we should reset it to default (64KiB afaik) if it was
> required before and is not required any more. Otherwise we would not
> decrease the limit after unplugging the last VFIO device (on x86).

I agree, and I planned to do something about that in a
follow-up patch as this change alone is already a small
improvement over the status quo.

Would you prefer it if I pulled this patch from the series
for now and posted it again once it supports restoring the
limit back to the default once the last VFIO device has been
removed from the guest? I'd be okay with that.

Cheers.

-- 
Andrea Bolognani
Software Engineer - Virtualization Team

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]