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


Groups > linux.kernel > #1211819 > unrolled thread

linux-next: manual merge of the kvm-ppc tree with the tip tree

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2015-08-24 08:10 +0200
Last post2015-08-26 23:40 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  linux-next: manual merge of the kvm-ppc tree with the tip tree Stephen Rothwell <sfr@canb.auug.org.au> - 2015-08-24 08:10 +0200
    Re: linux-next: manual merge of the kvm-ppc tree with the tip tree Paul Mackerras <paulus@ozlabs.org> - 2015-08-26 20:30 +0200
      Re: linux-next: manual merge of the kvm-ppc tree with the tip tree Stephen Rothwell <sfr@canb.auug.org.au> - 2015-08-26 23:40 +0200

#1211819 — linux-next: manual merge of the kvm-ppc tree with the tip tree

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2015-08-24 08:10 +0200
Subjectlinux-next: manual merge of the kvm-ppc tree with the tip tree
Message-ID<q0T7b-7Da-1@gated-at.bofh.it>
Hi Alexander,

Today's linux-next merge of the kvm-ppc tree got a conflict in:

  arch/powerpc/kvm/book3s_hv.c

between commit:

  c56dadf39761 ("sched/preempt, powerpc, kvm: Use need_resched() instead of should_resched()")

from the tip tree and commit:

  ec2571650826 ("KVM: PPC: Book3S HV: Make use of unused threads when running guests")

from the kvm-ppc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc arch/powerpc/kvm/book3s_hv.c
index a9f753fb73a8,fad52f226c12..000000000000
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@@ -2178,11 -2670,12 +2670,13 @@@ static int kvmppc_run_vcpu(struct kvm_r
  		vc->runner = vcpu;
  		if (n_ceded == vc->n_runnable) {
  			kvmppc_vcore_blocked(vc);
 -		} else if (should_resched()) {
 +		} else if (need_resched()) {
 +			vc->vcore_state = VCORE_PREEMPT;
+ 			kvmppc_vcore_preempt(vc);
  			/* Let something else run */
  			cond_resched_lock(&vc->lock);
- 			vc->vcore_state = VCORE_INACTIVE;
+ 			if (vc->vcore_state == VCORE_PREEMPT)
+ 				kvmppc_vcore_end_preempt(vc);
  		} else {
  			kvmppc_run_core(vc);
  		}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1214110

FromPaul Mackerras <paulus@ozlabs.org>
Date2015-08-26 20:30 +0200
Message-ID<q1NCq-5hp-27@gated-at.bofh.it>
In reply to#1211819
Hi Stephen,

On Mon, Aug 24, 2015 at 03:59:54PM +1000, Stephen Rothwell wrote:
> Hi Alexander,
> 
> Today's linux-next merge of the kvm-ppc tree got a conflict in:
> 
>   arch/powerpc/kvm/book3s_hv.c
> 
> between commit:
> 
>   c56dadf39761 ("sched/preempt, powerpc, kvm: Use need_resched() instead of should_resched()")
> 
> from the tip tree and commit:
> 
>   ec2571650826 ("KVM: PPC: Book3S HV: Make use of unused threads when running guests")
> 
> from the kvm-ppc tree.
> 
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).

The fix isn't quite correct (see below), but the error is benign.

> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> 
> diff --cc arch/powerpc/kvm/book3s_hv.c
> index a9f753fb73a8,fad52f226c12..000000000000
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@@ -2178,11 -2670,12 +2670,13 @@@ static int kvmppc_run_vcpu(struct kvm_r
>   		vc->runner = vcpu;
>   		if (n_ceded == vc->n_runnable) {
>   			kvmppc_vcore_blocked(vc);
>  -		} else if (should_resched()) {
>  +		} else if (need_resched()) {
>  +			vc->vcore_state = VCORE_PREEMPT;

This line is removed in the kvm-ppc tree because it is now in the new
kvmppc_vcore_preempt() function.  Thus we don't need this line in the
merge result.  However, having it here just means that we set
vc->vcore_state to VCORE_PREEMPT twice.

> + 			kvmppc_vcore_preempt(vc);
>   			/* Let something else run */
>   			cond_resched_lock(&vc->lock);
> - 			vc->vcore_state = VCORE_INACTIVE;
> + 			if (vc->vcore_state == VCORE_PREEMPT)
> + 				kvmppc_vcore_end_preempt(vc);
>   		} else {
>   			kvmppc_run_core(vc);
>   		}

Regards,
Paul.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1214207

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2015-08-26 23:40 +0200
Message-ID<q1QAi-12Y-17@gated-at.bofh.it>
In reply to#1214110
Hi Paul,

On Wed, 26 Aug 2015 11:21:00 -0700 Paul Mackerras <paulus@ozlabs.org> wrote:
>
> On Mon, Aug 24, 2015 at 03:59:54PM +1000, Stephen Rothwell wrote:
> >  -		} else if (should_resched()) {
> >  +		} else if (need_resched()) {
> >  +			vc->vcore_state = VCORE_PREEMPT;
> 
> This line is removed in the kvm-ppc tree because it is now in the new
> kvmppc_vcore_preempt() function.  Thus we don't need this line in the
> merge result.  However, having it here just means that we set
> vc->vcore_state to VCORE_PREEMPT twice.

Thanks for the report.  I have fixed up my reolution.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web