Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753956AbdIETDZ (ORCPT ); Tue, 5 Sep 2017 15:03:25 -0400 Received: from smtp2.provo.novell.com ([137.65.250.81]:54446 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753774AbdIETBB (ORCPT ); Tue, 5 Sep 2017 15:01:01 -0400 From: Davidlohr Bueso To: mingo@redhat.com, peterz@infradead.org, pbonzini@redhat.com Cc: npiggin@gmail.com, paulmck@linux.vnet.ibm.com, dave@stgolabs.net, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: [PATCH 2/6] kvm,async_pf: Use swq_has_sleepers() Date: Tue, 5 Sep 2017 12:00:18 -0700 Message-Id: <20170905190022.1474-3-dave@stgolabs.net> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170905190022.1474-1-dave@stgolabs.net> References: <20170905190022.1474-1-dave@stgolabs.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 726 Lines: 27 ... as we've got the new helper now. This caller already does the right thing, hence no changes in semantics. Signed-off-by: Davidlohr Bueso --- virt/kvm/async_pf.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index bb298a200cd3..57bcb27dcf30 100644 --- a/virt/kvm/async_pf.c +++ b/virt/kvm/async_pf.c @@ -106,11 +106,7 @@ static void async_pf_execute(struct work_struct *work) trace_kvm_async_pf_completed(addr, gva); - /* - * This memory barrier pairs with prepare_to_wait's set_current_state() - */ - smp_mb(); - if (swait_active(&vcpu->wq)) + if (swq_has_sleeper(&vcpu->wq)) swake_up(&vcpu->wq); mmput(mm); -- 2.12.0