From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v2 0/7] swait: Introduce and use swq_has_sleeper() Date: Fri, 15 Sep 2017 13:53:15 +0200 Message-ID: References: <20170913200824.28067-1-dave@stgolabs.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: npiggin@gmail.com, paulmck@linux.vnet.ibm.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Christian Borntraeger , Cornelia Huck To: Davidlohr Bueso , mingo@kernel.org, peterz@infradead.org Return-path: In-Reply-To: <20170913200824.28067-1-dave@stgolabs.net> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 13/09/2017 22:08, Davidlohr Bueso wrote: > The following patches fix and/or justify (in baby steps) some of the > callers. The main exception is s390, which I didn't follow how ->valid_wakeup > can get hoisted as kvm_vcpu_block does not use that in the wait loop. valid_wakeup is just an optimization, so it's not a problem. There seems to be always an atomic_or or set_bit before kvm_s390_vcpu_wakeup is called (except kvm_s390_idle_wakeup which has no store at all and doesn't need any serialization). So my suggestion is to add an smp__mb_after_atomic in kvm_s390_vcpu_wakeup; I'll let the s390 guys do it. Paolo