From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH RFC 5/6] KVM: mark requests that do not need a wakeup Date: Fri, 7 Apr 2017 09:27:00 +0100 Message-ID: References: <20170406202056.18379-1-rkrcmar@redhat.com> <20170406202056.18379-6-rkrcmar@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Christoffer Dall , Andrew Jones , Paolo Bonzini , Christian Borntraeger , Cornelia Huck , James Hogan , Paul Mackerras To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Return-path: In-Reply-To: <20170406202056.18379-6-rkrcmar@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 06/04/17 21:20, Radim Krčmář wrote: > Some operations must ensure that the guest is not running with stale > data, but if the guest is halted, then the update can wait until another > event happens. kvm_make_all_requests() currently doesn't wake up, so we > can mark all requests used with it. > > First 8 bits were arbitrarily reserved for request numbers. > > Most uses of requests have the request type as a constant, so a compiler > will optimize the '&'. > > An alternative would be to have an inline function that would return > whether the request needs a wake-up or not, but I like this one better > even though it might produce worse assembly. > > Suggested-by: Christoffer Dall > Signed-off-by: Radim Krčmář > --- > Btw. do you recall which macro allowed to define bitmasks? (It has > two arguments, FROM and TO.) GENMASK (and its _ULL variant), defined in include/linux/bitops.h. Thanks, M. -- Jazz is not dead. It just smells funny...