Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1438536

Re: [PATCH v2 0/4] implement vcpu preempted check

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 0/4] implement vcpu preempted check
Date 2016-07-07 13:30 +0200
Message-ID <rSfFf-6fa-15@gated-at.bofh.it> (permalink)
References (2 earlier) <rRSyZ-850-11@gated-at.bofh.it> <rRTOp-Bq-3@gated-at.bofh.it> <rRUhs-Lb-13@gated-at.bofh.it> <rSdap-4y2-5@gated-at.bofh.it> <rSe6u-59g-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jul 07, 2016 at 11:42:15AM +0200, Peter Zijlstra wrote:
> +static void update_steal_time_preempt(struct kvm_vcpu *vcpu)
> +{
> +	struct kvm_steal_time *st;
> +
> +	if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED))
> +		return;
> +
> +	if (unlikely(kvm_read_guest_cached(vcpu->kvm, &vcpu->arch.st.stime,
> +		&vcpu->arch.st.steal, sizeof(struct kvm_steal_time))))
> +		return;
> +
> +	st = &vcpu->arch.st.steal;
> +
> +	st->pad[KVM_ST_PAD_PREEMPT] = 1; /* we've stopped running */

So maybe have this be:

	... = kvm_vcpu_running();

That avoids marking the vcpu preempted when we do hlt and such.

> +	kvm_write_guest_cached(vcpu->kvm, &vcpu->arch.st.stime,
> +		st, sizeof(struct kvm_steal_time));
> +}

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/4] implement vcpu preempted check Pan Xinhui <xinhui.pan@linux.vnet.ibm.com> - 2016-06-28 12:50 +0200
  [PATCH v2 1/4] kernel/sched: introduce vcpu preempted check interface Pan Xinhui <xinhui.pan@linux.vnet.ibm.com> - 2016-06-28 12:50 +0200
  [PATCH v2 3/4] locking/osq: Drop the overload of osq_lock() Pan Xinhui <xinhui.pan@linux.vnet.ibm.com> - 2016-06-28 12:50 +0200
  [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check Pan Xinhui <xinhui.pan@linux.vnet.ibm.com> - 2016-06-28 12:50 +0200
    Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check Wanpeng Li <kernellwp@gmail.com> - 2016-07-05 12:00 +0200
      Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check xinhui <xinhui.pan@linux.vnet.ibm.com> - 2016-07-06 07:00 +0200
        Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check Wanpeng Li <kernellwp@gmail.com> - 2016-07-06 08:50 +0200
          Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check Peter Zijlstra <peterz@infradead.org> - 2016-07-06 10:00 +0200
            Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check Wanpeng Li <kernellwp@gmail.com> - 2016-07-06 10:40 +0200
              Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check xinhui <xinhui.pan@linux.vnet.ibm.com> - 2016-07-06 12:20 +0200
    Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check Balbir Singh <bsingharora@gmail.com> - 2016-07-06 13:00 +0200
  [PATCH v2 4/4] kernel/locking: Drop the overload of {mutex,rwsem}_spin_on_owner Pan Xinhui <xinhui.pan@linux.vnet.ibm.com> - 2016-06-28 12:50 +0200
  Re: [PATCH v2 0/4] implement vcpu preempted check Peter Zijlstra <peterz@infradead.org> - 2016-07-06 09:00 +0200
    Re: [PATCH v2 0/4] implement vcpu preempted check Juergen Gross <jgross@suse.com> - 2016-07-06 09:50 +0200
      Re: [PATCH v2 0/4] implement vcpu preempted check Peter Zijlstra <peterz@infradead.org> - 2016-07-06 10:20 +0200
        Re: [PATCH v2 0/4] implement vcpu preempted check Juergen Gross <jgross@suse.com> - 2016-07-06 10:40 +0200
        Re: [PATCH v2 0/4] implement vcpu preempted check Paolo Bonzini <pbonzini@redhat.com> - 2016-07-06 14:50 +0200
        Re: [PATCH v2 0/4] implement vcpu preempted check Christian Borntraeger <borntraeger@de.ibm.com> - 2016-07-06 19:00 +0200
    Re: [PATCH v2 0/4] implement vcpu preempted check xinhui <xinhui.pan@linux.vnet.ibm.com> - 2016-07-06 12:10 +0200
    Re: [PATCH v2 0/4] implement vcpu preempted check Paolo Bonzini <pbonzini@redhat.com> - 2016-07-06 12:50 +0200
      Re: [PATCH v2 0/4] implement vcpu preempted check Wanpeng Li <kernellwp@gmail.com> - 2016-07-06 14:10 +0200
        Re: [PATCH v2 0/4] implement vcpu preempted check Paolo Bonzini <pbonzini@redhat.com> - 2016-07-06 14:40 +0200
          Re: [PATCH v2 0/4] implement vcpu preempted check Wanpeng Li <kernellwp@gmail.com> - 2016-07-06 15:10 +0200
          Re: [PATCH v2 0/4] implement vcpu preempted check Wanpeng Li <kernellwp@gmail.com> - 2016-07-07 10:50 +0200
            Re: [PATCH v2 0/4] implement vcpu preempted check Peter Zijlstra <peterz@infradead.org> - 2016-07-07 11:50 +0200
              Re: [PATCH v2 0/4] implement vcpu preempted check Wanpeng Li <kernellwp@gmail.com> - 2016-07-07 12:20 +0200
                Re: [PATCH v2 0/4] implement vcpu preempted check Wanpeng Li <kernellwp@gmail.com> - 2016-07-07 12:30 +0200
                Re: [PATCH v2 0/4] implement vcpu preempted check Peter Zijlstra <peterz@infradead.org> - 2016-07-07 13:20 +0200
                Re: [PATCH v2 0/4] implement vcpu preempted check Peter Zijlstra <peterz@infradead.org> - 2016-07-07 13:10 +0200
              Re: [PATCH v2 0/4] implement vcpu preempted check Peter Zijlstra <peterz@infradead.org> - 2016-07-07 13:10 +0200
              Re: [PATCH v2 0/4] implement vcpu preempted check Peter Zijlstra <peterz@infradead.org> - 2016-07-07 13:30 +0200
      Re: [PATCH v2 0/4] implement vcpu preempted check Peter Zijlstra <peterz@infradead.org> - 2016-07-06 14:10 +0200

csiph-web