OpenVZ Forum


Home » Mailing lists » Users » openvz and qemu
openvz and qemu [message #26800] Fri, 01 February 2008 06:05 Go to next message
Dietmar Maurer is currently offline  Dietmar Maurer
Messages: 52
Registered: March 2007
Member
Hi all,

i want to run a few qemu VMs inside VE0. Just wonder how to set
fairsched properties 
for a single process?

	- howto create a new faisched group (for the qemu process)?
	- howto assign weight/rate

or is that not possible at all?

- Dietmar
AW: openvz and qemu [message #26801 is a reply to message #26800] Fri, 01 February 2008 06:23 Go to previous messageGo to next message
Dietmar Maurer is currently offline  Dietmar Maurer
Messages: 52
Registered: March 2007
Member
OK, basically found the syscall interface in kernel/fairsched.c

But how do I find out the syscall numbers, i.e how do I 
call sys_fairsched_mknod() with userspace syscall()

- Dietmar

> -----Ursprüngliche Nachricht-----
> Von: users-bounces@openvz.org 
> [mailto:users-bounces@openvz.org] Im Auftrag von Dietmar Maurer
> Gesendet: Freitag, 01. Februar 2008 07:05
> An: users@openvz.org
> Betreff: [Users] openvz and qemu
> 
> Hi all,
> 
> i want to run a few qemu VMs inside VE0. Just wonder how to 
> set fairsched properties for a single process?
> 
> 	- howto create a new faisched group (for the qemu process)?
> 	- howto assign weight/rate
> 
> or is that not possible at all?
>
Re: AW: openvz and qemu [message #26803 is a reply to message #26801] Fri, 01 February 2008 07:13 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

check vzctl sources. it calls other OVZ-specific syscalls by their numbers,
like sys_setluid, sys_setublimit etc.

For creating fairsched node you'll need to call fairsched_mknod first, then move
the process to this node using fairsched_mvpr
 

Dietmar Maurer wrote:
> OK, basically found the syscall interface in kernel/fairsched.c
> 
> But how do I find out the syscall numbers, i.e how do I 
> call sys_fairsched_mknod() with userspace syscall()
> 
> - Dietmar
> 
>> -----Ursprüngliche Nachricht-----
>> Von: users-bounces@openvz.org 
>> [mailto:users-bounces@openvz.org] Im Auftrag von Dietmar Maurer
>> Gesendet: Freitag, 01. Februar 2008 07:05
>> An: users@openvz.org
>> Betreff: [Users] openvz and qemu
>>
>> Hi all,
>>
>> i want to run a few qemu VMs inside VE0. Just wonder how to 
>> set fairsched properties for a single process?
>>
>> 	- howto create a new faisched group (for the qemu process)?
>> 	- howto assign weight/rate
>>
>> or is that not possible at all?
>>
> 
>
AW: AW: openvz and qemu [message #27091 is a reply to message #26803] Fri, 08 February 2008 17:07 Go to previous messageGo to next message
Dietmar Maurer is currently offline  Dietmar Maurer
Messages: 52
Registered: March 2007
Member
> check vzctl sources. it calls other OVZ-specific syscalls by 
> their numbers, like sys_setluid, sys_setublimit etc.
> 
> For creating fairsched node you'll need to call 
> fairsched_mknod first, then move the process to this node 
> using fairsched_mvpr

OK, I wrote a small (perl) script to test those syscalls, and everything
work as expected, for example:

..
fairsched_mknod (0, 500, 400);
fairsched_vcpus (400, 1);
set_cpulimit (400, 25);
fairsched_mvpr ($$, 400);
fork_and_do_something(); # runs with 25% cpu
wait
fairsched_rmnod (400);
..

work perfectly.

But when I call fairsched_rmnod(400) from another process while there is
still a process running inside 400 the system freezes. I get a kernel
panic somewhere inside move_task_off_dead_cpu.

any idea how to fix that?

- Dietmar
Re: AW: AW: openvz and qemu [message #27102 is a reply to message #27091] Sat, 09 February 2008 11:07 Go to previous messageGo to next message
Kirill Korotaev is currently offline  Kirill Korotaev
Messages: 137
Registered: January 2006
Senior Member
node should be deleted normally only when no processes left.
it's possible to fix syscall to return an error when node is non-empty...


Dietmar Maurer wrote:
>  
>> check vzctl sources. it calls other OVZ-specific syscalls by 
>> their numbers, like sys_setluid, sys_setublimit etc.
>>
>> For creating fairsched node you'll need to call 
>> fairsched_mknod first, then move the process to this node 
>> using fairsched_mvpr
> 
> OK, I wrote a small (perl) script to test those syscalls, and everything
> work as expected, for example:
> 
> ..
> fairsched_mknod (0, 500, 400);
> fairsched_vcpus (400, 1);
> set_cpulimit (400, 25);
> fairsched_mvpr ($$, 400);
> fork_and_do_something(); # runs with 25% cpu
> wait
> fairsched_rmnod (400);
> ..
> 
> work perfectly.
> 
> But when I call fairsched_rmnod(400) from another process while there is
> still a process running inside 400 the system freezes. I get a kernel
> panic somewhere inside move_task_off_dead_cpu.
> 
> any idea how to fix that?
> 
> - Dietmar
> 
> 
> 
> 
>
AW: AW: AW: openvz and qemu [message #27120 is a reply to message #27102] Sun, 10 February 2008 07:15 Go to previous messageGo to next message
Dietmar Maurer is currently offline  Dietmar Maurer
Messages: 52
Registered: March 2007
Member
> node should be deleted normally only when no processes left.
> it's possible to fix syscall to return an error when node is 
> non-empty...

Ok, will try make sure that no processes left. But I thing the syscall
should be fixed too.

- Dietmar
Re: AW: AW: AW: openvz and qemu [message #27156 is a reply to message #27120] Mon, 11 February 2008 12:47 Go to previous messageGo to next message
Kirill Korotaev is currently offline  Kirill Korotaev
Messages: 137
Registered: January 2006
Senior Member
care to create a patch?


Dietmar Maurer wrote:
>> node should be deleted normally only when no processes left.
>> it's possible to fix syscall to return an error when node is 
>> non-empty...
> 
> Ok, will try make sure that no processes left. But I thing the syscall
> should be fixed too.
> 
> - Dietmar
> 
>
AW: AW: AW: openvz and qemu [message #27168 is a reply to message #27156] Mon, 11 February 2008 15:58 Go to previous messageGo to next message
Dietmar Maurer is currently offline  Dietmar Maurer
Messages: 52
Registered: March 2007
Member
> care to create a patch?

Please can you give me a hint where i can find the list of
processes associated with a fairsched node?

- Dietmar
Re: AW: AW: AW: openvz and qemu [message #27172 is a reply to message #27168] Mon, 11 February 2008 16:26 Go to previous message
Kirill Korotaev is currently offline  Kirill Korotaev
Messages: 137
Registered: January 2006
Senior Member
AFAIR the only way is to take tasklist_lock
and check for tasks having vsched == your-node-vsched.

Kirill


Dietmar Maurer wrote:
>> care to create a patch?
> 
> Please can you give me a hint where i can find the list of
> processes associated with a fairsched node?
> 
> - Dietmar
> 
>
Previous Topic: AW: problems wit 2.6.24 from git
Next Topic: virtual machine not able to ping out side netwrok
Goto Forum:
  


Current Time: Fri Nov 08 23:09:53 GMT 2024

Total time taken to generate the page: 0.03428 seconds