From: Paolo Bonzini Subject: Re: [PATCH] kvm: rename HINTS_DEDICATED to KVM_HINTS_REALTIME Date: Fri, 18 May 2018 19:17:43 +0200 Message-ID: <9d528020-87f6-a600-9d08-02c88d20b18c@redhat.com> References: <1526568841-35372-1-git-send-email-mst@redhat.com> <20180517184658.GA1543@localhost.localdomain> <20180517225316-mutt-send-email-mst@kernel.org> <20180518160431.GX25013@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, qemu-devel@nongnu.org To: Eduardo Habkost , "Michael S. Tsirkin" Return-path: In-Reply-To: <20180518160431.GX25013@localhost.localdomain> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 18/05/2018 18:04, Eduardo Habkost wrote: >> Without mlock you should always use pv spinlocks. >> >> Otherwise you risk blocking on a lock taken by >> a VCPU that is in turn blocked on IO, where the IO >> is not completing because CPU is being used up >> spinning. > > So the stronger guarantee seems necessary. > > Now what should host userspace do if the user is trying to run an > existing configuration where the CPUID hint was set but memory is > not pinned? As mentioned elsewhere in the thread, there are many ways to pin memory, and mlock is not always necessary. However, I agree with Michael in making the hint provide a stronger guarantee. Paolo