Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751364AbdIOLxV (ORCPT ); Fri, 15 Sep 2017 07:53:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47642 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751184AbdIOLxU (ORCPT ); Fri, 15 Sep 2017 07:53:20 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 12DCF883B9 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=pbonzini@redhat.com Subject: Re: [PATCH v2 0/7] swait: Introduce and use swq_has_sleeper() To: Davidlohr Bueso , mingo@kernel.org, peterz@infradead.org Cc: npiggin@gmail.com, paulmck@linux.vnet.ibm.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Christian Borntraeger , Cornelia Huck References: <20170913200824.28067-1-dave@stgolabs.net> From: Paolo Bonzini Message-ID: Date: Fri, 15 Sep 2017 13:53:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170913200824.28067-1-dave@stgolabs.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 15 Sep 2017 11:53:20 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 623 Lines: 14 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