All of lore.kernel.org
 help / color / mirror / Atom feed
* Re:Re: Is guest OS oriented scheduling welcome?
@ 2009-04-24  7:49 alex
  2009-04-24  8:12 ` alex
  0 siblings, 1 reply; 5+ messages in thread
From: alex @ 2009-04-24  7:49 UTC (permalink / raw)
  To: anthony, kvm

> From: Anthony Liguori <anthony <at> codemonkey.ws>
> By standard thread scheduling, I presume you mean scheduling that
> doesn't take int> From: Anthony Liguori <anthony <at> codemonkey.ws>
> By standard thread scheduling, I presume you mean scheduling that
> doesn't take into account IO?  That is, this paper is arguing that in a
> virtualization environment, you want to provide temporary
> disproportionate scheduling to favor IO bound workloads over CPU bound
> workloads.

> I don't think you need the credit scheduler to implement this idea in
> KVM.

> I don't think you need the credit scheduler to implement this idea in
> KVM.
I tested the CFS in detail, according to Documentation/sched-design-CFS.txt

The hardware is a Dell Core2 2Gmemory.. The linux kernel is 2.6.29,
previous downloaded via git clone (the kvm.git tree)
the default configuration is CONFIG_CGROUP_SCHED, and I did the following:
	# mkdir /dev/cpuctl
	# mount -t cgroup -ocpu none /dev/cpuctl
	# cd /dev/cpuctl

	# mkdir fast
	# mkdir slow
        #mkdir mid

	# echo 2048 > fast/cpu.shares
	# echo 1024 > slow/cpu.shares
        # echo 1536 > mid/cpu.shares

        # ./qemu-x86-64.... -hda ~/CentOS.img -smp 2
          in the created VM, run two following foo process:
main()
{
   int i=10;
   while(1)
      i*= 56;
}
   on the host machine, put all the qemu threads(get via ps -eLf |
grep qemu) to the fast group
    # echo <thread1> > fast/tasks
    # echo <thread2> > fast/tasks
    #.....

    on the host machine, put the two foo process to slow cgroup
    #echo <foo1> > slow/tasks
    #echo <foo2> > slow/tasks

    start another SMP VM, and in the newly created vm, run foo
    # ./qemu-x86-64 ... -hda ~/CentOS2.img -smp 2
       .....
    put all the threads of the new qemu process to the mid cgroup.

   Use `top' to see the cpu usage.

   I found it does not work.  Is this a bug to CFS?

   And I found CFS does not reserve cpu usage. That is to say, when
none else is active, the active one can take all the cpu time.  Is it
wanted if you want to sell computer power?

Regards,
alex.

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

* Re: Re: Is guest OS oriented scheduling welcome?
  2009-04-24  7:49 Re:Re: Is guest OS oriented scheduling welcome? alex
@ 2009-04-24  8:12 ` alex
  2009-04-27  3:14   ` Su, Disheng
  0 siblings, 1 reply; 5+ messages in thread
From: alex @ 2009-04-24  8:12 UTC (permalink / raw)
  To: anthony, kvm

On Fri, Apr 24, 2009 at 3:49 PM, alex <tomorrowanewday@gmail.com> wrote:
> I tested the CFS in detail, according to Documentation/sched-design-CFS.txt
>
>   I found it does not work.  Is this a bug to CFS?
>

I reviewed my experiment, and found a mistake there.
The CFS is OK.

But the information shown from 'top' reveals that the jitter is somewhat great.

>   And I found CFS does not reserve cpu usage. That is to say, when
> none else is active, the active one can take all the cpu time.
this statement holds.

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

* RE: Re: Is guest OS oriented scheduling welcome?
  2009-04-24  8:12 ` alex
@ 2009-04-27  3:14   ` Su, Disheng
  2009-04-29 14:35     ` alex
  0 siblings, 1 reply; 5+ messages in thread
From: Su, Disheng @ 2009-04-27  3:14 UTC (permalink / raw)
  To: alex, anthony, kvm; +Cc: Su, Disheng

alex wrote:
> On Fri, Apr 24, 2009 at 3:49 PM, alex <tomorrowanewday@gmail.com>
> wrote: 
>> I tested the CFS in detail, according to
>> Documentation/sched-design-CFS.txt 
>> 
>>   I found it does not work.  Is this a bug to CFS?
>> 
> 
> I reviewed my experiment, and found a mistake there.
> The CFS is OK.
> 
> But the information shown from 'top' reveals that the jitter is
> somewhat great. 
> 
>>   And I found CFS does not reserve cpu usage. That is to say, when
>> none else is active, the active one can take all the cpu time. this
>> statement holds. 

From this threads:
http://markmail.org/message/rmww5bbxkdcpoqjm
https://lists.linux-foundation.org/pipermail/containers/2008-August/012128.html
http://lkml.indiana.edu/hypermail/linux/kernel/0606.1/2270.html
CFS doesn't support hard-cpu-limit, like "cap" in credit scheduler. There are some patches posted in LKML
http://markmail.org/message/fuiq2dn3h74yj4zg, but applied on ooold scheduler.

Will you add hard-cpu-limit feature into CFS?:) I think it's usefull.

Best Regards,
Disheng, Su

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

* Re: Re: Is guest OS oriented scheduling welcome?
  2009-04-27  3:14   ` Su, Disheng
@ 2009-04-29 14:35     ` alex
  0 siblings, 0 replies; 5+ messages in thread
From: alex @ 2009-04-29 14:35 UTC (permalink / raw)
  To: Su, Disheng, anthony, kvm

Hello,
It will take some time for me to add the feature to CFS.
Would you mind using credit scheduler instead?

These days, I have changed my port into a separate module, with only
adding some hooks to KVM.

I have tested the case that the KVM is an external module. But I fail
to insert my module in the kernel get from kvm.git.
the error message is

FATAL: Error inserting vms (/lib/modules/2.6.29/extra/vms.ko): Invalid
module format

I still encounter this problem even if the kernel is compiled with
CONFIG_MODVERSIONS=n
(this situation is not unique to me: an external KVM module can not be
loaded either.)
Does anyone know the solution?

On Mon, Apr 27, 2009 at 11:14 AM, Su, Disheng <disheng.su@intel.com> wrote:

> From this threads:
> http://markmail.org/message/rmww5bbxkdcpoqjm
> https://lists.linux-foundation.org/pipermail/containers/2008-August/012128.html
> http://lkml.indiana.edu/hypermail/linux/kernel/0606.1/2270.html
> CFS doesn't support hard-cpu-limit, like "cap" in credit scheduler. There are some patches posted in LKML
> http://markmail.org/message/fuiq2dn3h74yj4zg, but applied on ooold scheduler.
>
> Will you add hard-cpu-limit feature into CFS?:) I think it's usefull.
>
> Best Regards,
> Disheng, Su

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

* Re: Re: Is guest OS oriented scheduling welcome?
@ 2009-04-24  3:32 alex
  0 siblings, 0 replies; 5+ messages in thread
From: alex @ 2009-04-24  3:32 UTC (permalink / raw)
  To: kvm

> From: Anthony Liguori <anthony <at> codemonkey.ws>
> By standard thread scheduling, I presume you mean scheduling that
> doesn't take into account IO?  That is, this paper is arguing that in a
> virtualization environment, you want to provide temporary
> disproportionate scheduling to favor IO bound workloads over CPU bound
> workloads.

> I don't think you need the credit scheduler to implement this idea in
> KVM.

I don't think either. ;)
Yes, according to http://kerneltrap.org/node/11773 CFS can provide
rather find cpu usage control.

In fact, credit scheduler is not my ultimate goal. I value the extra
execution control mechanism more.
My goal is to implement the function that virtual machine user
specifies the virtual machine interaction model and the QoS
requirement, and upon collecting these information, the user tools
automatically informs the scheduling mechanism to treat  all the
related virtual machines as a whole to fulfil the user's needs
efficiently.
Can cgroups meet my requirement?  Maybe I should study it. Would you
mind giving me an example?

> What are the other motivating factors for wanting to use credit over cfs?
As I stated above, I am not sure which scheduler is better. What I
care is how to co-schedule related vcpus efficiently.

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

end of thread, other threads:[~2009-04-29 14:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-24  7:49 Re:Re: Is guest OS oriented scheduling welcome? alex
2009-04-24  8:12 ` alex
2009-04-27  3:14   ` Su, Disheng
2009-04-29 14:35     ` alex
  -- strict thread matches above, loose matches on Subject: below --
2009-04-24  3:32 alex

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.