[libvirt] [PATCH 2 of 3] Add scheduling parameter support for LXC domains
Daniel P. Berrange
berrange at redhat.com
Tue Oct 7 16:15:29 UTC 2008
On Tue, Oct 07, 2008 at 08:30:21AM -0700, Dan Smith wrote:
> diff -r 6fb284fa200a -r ebecbe5caa03 src/lxc_driver.c
> --- a/src/lxc_driver.c Tue Oct 07 08:21:49 2008 -0700
> +++ b/src/lxc_driver.c Tue Oct 07 08:21:50 2008 -0700
> @@ -35,6 +35,7 @@
> #include <unistd.h>
> #include <wait.h>
>
> +#include "internal.h"
> #include "lxc_conf.h"
> #include "lxc_container.h"
> #include "lxc_driver.h"
> @@ -1149,6 +1150,94 @@
> return 0;
> }
>
> +static char *lxcGetSchedulerType(virDomainPtr domain, int *nparams)
> +{
> + if (nparams)
> + *nparams = 1;
> +
> + return strdup("cgroup");
> +}
cgroups isn't really the schedular here - its just the mechanism for
supplying the cpu_shares parameter to the schedular.
I sort of imagined that for Linux based VMs we'd key this off the
various schedulars available for sched_getscheduler(2), but
actually thinking about it more, its probably best to just say that
the schedular is 'posix', and make the choice of SCHED_FIFO,
SCHED_RR, SCHED_OTHER, etc be a tunable parameter.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list