linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Peter Xu <peterx@redhat.com>
Cc: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	Radim Kr??m???? <rkrcmar@redhat.com>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] sched/swait: allow swake_up() to return
Date: Fri, 10 Nov 2017 09:05:20 +0100	[thread overview]
Message-ID: <20171110080520.uslq75uucwlg5y7y@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20171110071017.GH20627@xz-mi>

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.

  reply	other threads:[~2017-11-10  8:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20171109091854.24367-1-peterx@redhat.com>
2017-11-09  9:18 ` [PATCH 1/2] sched/swait: allow swake_up() to return Peter Xu
2017-11-09 10:06   ` Paolo Bonzini
2017-11-10  7:12     ` Peter Xu
2017-11-09 10:23   ` Peter Zijlstra
2017-11-10  7:10     ` Peter Xu
2017-11-10  8:05       ` Peter Zijlstra [this message]
2017-11-13  3:33         ` Peter Xu
2017-11-13  5:19           ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171110080520.uslq75uucwlg5y7y@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=rkrcmar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).