Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Apr 2015 20:15:48 +0000 (UTC)
From:      Neel Natu <neel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r281612 - head/sys/amd64/vmm/amd
Message-ID:  <201504162015.t3GKFmJ5059533@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: neel
Date: Thu Apr 16 20:15:47 2015
New Revision: 281612
URL: https://svnweb.freebsd.org/changeset/base/281612

Log:
  Prefer 'vcpu_should_yield()' over checking 'curthread->td_flags' directly.
  
  MFC after:	1 week

Modified:
  head/sys/amd64/vmm/amd/svm.c

Modified: head/sys/amd64/vmm/amd/svm.c
==============================================================================
--- head/sys/amd64/vmm/amd/svm.c	Thu Apr 16 20:11:49 2015	(r281611)
+++ head/sys/amd64/vmm/amd/svm.c	Thu Apr 16 20:15:47 2015	(r281612)
@@ -1917,7 +1917,7 @@ svm_vmrun(void *arg, int vcpu, register_
 		}
 
 		/* We are asked to give the cpu by scheduler. */
-		if (curthread->td_flags & (TDF_ASTPENDING | TDF_NEEDRESCHED)) {
+		if (vcpu_should_yield(vm, vcpu)) {
 			enable_gintr();
 			vm_exit_astpending(vm, vcpu, state->rip);
 			break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504162015.t3GKFmJ5059533>