From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755939AbdKJIFY (ORCPT ); Fri, 10 Nov 2017 03:05:24 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:36619 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbdKJIFW (ORCPT ); Fri, 10 Nov 2017 03:05:22 -0500 Date: Fri, 10 Nov 2017 09:05:20 +0100 From: Peter Zijlstra To: Peter Xu Cc: kvm@vger.kernel.org, Paolo Bonzini , Radim Kr??m???? , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] sched/swait: allow swake_up() to return Message-ID: <20171110080520.uslq75uucwlg5y7y@hirez.programming.kicks-ass.net> References: <20171109091854.24367-1-peterx@redhat.com> <20171109091854.24367-2-peterx@redhat.com> <20171109102303.vsetymxc6rllomhh@hirez.programming.kicks-ass.net> <20171110071017.GH20627@xz-mi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171110071017.GH20627@xz-mi> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 10, 2017 at 03:10:17PM +0800, Peter Xu wrote: > I came to this when reading kvm_vcpu_wake_up(), so that only affects > some statistic which may not be that critical. However I don't know > whether there would be any other real use case that we would like to > know exactly whether a call to [s]wake_up() has really done something > or just returned with a NOP. > > Anyway, please let me know if you think the same change to wake_up() > would be meaningful, otherwise I can drop this patch and post another > KVM-only one to clean up the redundant callers of swait_active(), > since even if we dropped that list check in 35a2897c2a30, we'll do > that again in swake_up_locked(). See commits: 8cd641e3c7cb ("sched/wait: Add swq_has_sleeper()") 5e0018b3e39e ("kvm: Serialize wq active checks in kvm_vcpu_wake_up()") In any case, I don't think we want the change you propose. The numbers don't mean much and there's no point in making all the callers in the kernel slower for it.