patch for virtual machine oriented scheduling(1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



the following patchs provide an extra control(besides the control of
Linux scheduler) over the execution of vcpu threads.

In this patch, Xen's credit
scheduler(http://wiki.xensource.com/xenwiki/CreditScheduler) is used.
User can use  "cat" and
"echo" command to view and control a guest os' credit.
e.g.,
[root@localhost ~]#  echo "weight=500" > /proc/kvm/12345
will change the credit of guest whose qemu process has the pid 12345 to be 500.

The patch consists of 3 parts:
1. modification to the standard KVM
2. modification to the Xen scheduler
3. helper functions

However, some are unnecessary in the latest Linux kernel.

The difficulties in the ports lie in:
1. Linux does not provide timer mechanism that the timer function is
bind to a dedicate CPU:
    in case of one cpu receives another cpu's schedule timer
expiration, IPI is used to relay it.
2. before linux 2.6.27, the smp_call_function_xxx()  can not be re-entered.
   if kvm is sending ipi at the time of relaying timer expiration
information, deadlock would occur in kernel versions below 2.6.27

In my implementation, tasklets are used to run the function of
scheduling, and  kernel thread is used to send IPI(in kernels above
2.6.27, this is unnecessary)

Originally, this code is developed at the release version of KVM-83.
In order to post it, I ported to the latest .git tree.  As a result,
modifications to files like external-module-compat-comm.h are omited.

NOTE:
1. Because my not having an AMD machine, only intel platforms are tested.
2. Because sched_setaffinity() is used (while Linux does not export
this symbol), the way of loading kvm modules are changed to be
./myins <directory that holds the kvm.ko and kvm-intel.ko>
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux