public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add need_resched check before go to kvm_resched
@ 2007-04-25 12:40 Dong, Eddie
       [not found] ` <10EA09EFD8728347A513008B6B0DA77A01599EB3-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Dong, Eddie @ 2007-04-25 12:40 UTC (permalink / raw)
  To: Dong, Eddie, Avi Kivity; +Cc: kvm-devel

[-- Attachment #1: Type: text/plain, Size: 460 bytes --]

A minor change to reduce vcpu_put/vcpu_load frequency (still base on
KVM-18). Not sure if you would like to see this?

Signed-off-by: Yaozu Dong <eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

--- vmx.old	2007-04-25 20:28:19.000000000 +0800
+++ vmx.new	2007-04-25 20:28:10.000000000 +0800
@@ -1945,7 +1945,8 @@
 				return -EINTR;
 			}
 
-			kvm_resched(vcpu);
+			if ( need_resched() )
+				kvm_resched(vcpu);
 			goto again;
 		}
 	}

[-- Attachment #2: kvm_sched.diff --]
[-- Type: application/octet-stream, Size: 244 bytes --]

--- vmx.old	2007-04-25 20:28:19.000000000 +0800
+++ vmx.new	2007-04-25 20:28:10.000000000 +0800
@@ -1945,7 +1945,8 @@
 				return -EINTR;
 			}
 
-			kvm_resched(vcpu);
+			if ( need_resched() )
+				kvm_resched(vcpu);
 			goto again;
 		}
 	}

[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-04-26  4:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-25 12:40 [PATCH] Add need_resched check before go to kvm_resched Dong, Eddie
     [not found] ` <10EA09EFD8728347A513008B6B0DA77A01599EB3-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-04-25 12:45   ` Avi Kivity
     [not found]     ` <462F4D58.7090607-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-04-25 13:17       ` Dong, Eddie
     [not found]         ` <10EA09EFD8728347A513008B6B0DA77A01599ECA-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-04-25 13:49           ` Avi Kivity
2007-04-25 13:49   ` Anthony Liguori
     [not found]     ` <462F5C7E.7010605-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-04-25 13:53       ` Avi Kivity
2007-04-25 23:18       ` Dong, Eddie
     [not found]         ` <10EA09EFD8728347A513008B6B0DA77A01599F54-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-04-25 23:50           ` Anthony Liguori
     [not found]             ` <462FE952.5050907-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-04-26  0:23               ` Dong, Eddie
     [not found]                 ` <10EA09EFD8728347A513008B6B0DA77A01599FA7-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-04-26  0:35                   ` Anthony Liguori
     [not found]                     ` <462FF3B7.6010707-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-04-26  1:04                       ` Dong, Eddie
     [not found]                         ` <10EA09EFD8728347A513008B6B0DA77A0159A036-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-04-26  2:15                           ` Anthony Liguori
2007-04-26  4:46                       ` Avi Kivity
     [not found]                         ` <46302E8F.6070301-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-04-26  4:56                           ` Anthony Liguori
2007-04-26  4:41           ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox