OpenVZ Forum


Home » Mailing lists » Users » HELP:How can one VM interrupt another running VM ??
HELP:How can one VM interrupt another running VM ?? [message #42586] Tue, 03 May 2011 19:58 Go to next message
shule ney is currently offline  shule ney
Messages: 17
Registered: March 2011
Junior Member
Hi all:
I was wondering how can I use one VM to interrupt another running VM, is
there any schedular surpport this function, or any control I can use
to implement it. For OpenVZ, is it possible to achieve this?
Re: HELP:How can one VM interrupt another running VM ?? [message #42587 is a reply to message #42586] Tue, 03 May 2011 20:03 Go to previous messageGo to next message
Steven Crothers is currently offline  Steven Crothers
Messages: 3
Registered: May 2011
Junior Member
Why does this request sound malicious?

On Tue, May 3, 2011 at 3:58 PM, shule ney <neyshule@gmail.com> wrote:
> Hi all:
> I was wondering how can I use one VM to interrupt another running VM, is
> there any schedular surpport this function, or any control I can use
> to implement it. For OpenVZ, is it possible to achieve this?
--
Steven Crothers
steven.crothers@gmail.com
Re: HELP:How can one VM interrupt another running VM ?? [message #42588 is a reply to message #42587] Tue, 03 May 2011 20:08 Go to previous messageGo to next message
shule ney is currently offline  shule ney
Messages: 17
Registered: March 2011
Junior Member
I can't quite understand you, why you mean it's "malicious"?

2011/5/3 Steven Crothers <steven.crothers@gmail.com>

> Why does this request sound malicious?
>
> On Tue, May 3, 2011 at 3:58 PM, shule ney <neyshule@gmail.com> wrote:
> > Hi all:
> > I was wondering how can I use one VM to interrupt another running VM, is
> > there any schedular surpport this function, or any control I can use
> > to implement it. For OpenVZ, is it possible to achieve this?
> --
> Steven Crothers
> steven.crothers@gmail.com
>
Re: HELP:How can one VM interrupt another running VM ?? [message #42589 is a reply to message #42586] Tue, 03 May 2011 20:12 Go to previous messageGo to next message
Daniel Pittman is currently offline  Daniel Pittman
Messages: 26
Registered: January 2007
Junior Member
On Tue, May 3, 2011 at 12:58, shule ney <neyshule@gmail.com> wrote:

> I was wondering how can I use one VM to interrupt another running VM, is
> there any schedular surpport this function, or any control I can use
> to implement it. For OpenVZ, is it possible to achieve this?

Not as such, no, but: OpenVZ has a single scheduler across all threads
/ processes in all VEs. So, if you imagine the scheduler as working
on a single system with all those tasks the normal rules of process
scheduling apply.

Which means that if you set your higher priority stuff to a high nice
level, or real-time priority, it will take precedence over another VE
that runs lower priority stuff.

Finally, if you assign appropriate CPU shares to the VEs you can
ensure that they will get all the time divided appropriately at a high
level.

Regards,
Daniel

PS: Native Linux doesn't support this either. :)

--
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <daniel@rimspace.net>
✆ Contact me via gtalk, email, or phone: +1 (503) 893-2285
♲ Made with 100 percent post-consumer electrons
Re: HELP:How can one VM interrupt another running VM ?? [message #42590 is a reply to message #42589] Tue, 03 May 2011 20:27 Go to previous messageGo to next message
shule ney is currently offline  shule ney
Messages: 17
Registered: March 2011
Junior Member
Thanks Daniel, but it's not interrupt for that thread/process, the nice
value just set higher priority, what I want to do is like stop the current
running process in one VM, context swiching to another process in another
VM, when this process finishes, switch back to the original VM, of
course this preempting VM has higher nice value. Is it possible?

2011/5/3 Daniel Pittman <daniel@rimspace.net>

> On Tue, May 3, 2011 at 12:58, shule ney <neyshule@gmail.com> wrote:
>
> > I was wondering how can I use one VM to interrupt another running VM, is
> > there any schedular surpport this function, or any control I can use
> > to implement it. For OpenVZ, is it possible to achieve this?
>
> Not as such, no, but: OpenVZ has a single scheduler across all threads
> / processes in all VEs. So, if you imagine the scheduler as working
> on a single system with all those tasks the normal rules of process
> scheduling apply.
>
> Which means that if you set your higher priority stuff to a high nice
> level, or real-time priority, it will take precedence over another VE
> that runs lower priority stuff.
>
> Finally, if you assign appropriate CPU shares to the VEs you can
> ensure that they will get all the time divided appropriately at a high
> level.
>
> Regards,
> Daniel
>
> PS: Native Linux doesn't support this either. :)
>
> --
> ⎋ Puppet Labs Developer – http://puppetlabs.com
> ✉ Daniel Pittman <daniel@rimspace.net>
> ✆ Contact me via gtalk, email, or phone: +1 (503) 893-2285
> ♲ Made with 100 percent post-consumer electrons
>
Re: HELP:How can one VM interrupt another running VM ?? [message #42592 is a reply to message #42590] Tue, 03 May 2011 21:27 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
Greetings,

----- Original Message -----
> Thanks Daniel, but it's not interrupt for that thread/process, the
> nice value just set higher priority, what I want to do is like stop
> the current running process in one VM, context swiching to another
> process in another VM, when this process finishes, switch back to
> the original VM, of course this preempting VM has higher nice value.
> Is it possible?

No, that is NOT a built in feature of OpenVZ... and one would argue that it should not be a feature.

Having said that though, assuming you have root access to the host node running the containers, you could setup some type of monitoring of the process in the container that communicates to the host node, and when the host node sees a condition, you could chkcpoint the container, pass a message to the second container, start up some process there, monitor it, and when done, restore from chkpoint the first container.

That would take some work. The easiest way for monitoring would be checking for the presence or absence of a file... and that should be easy since the host node can see the container's filesystems.

I don't know if that is what you want or not but if I had to have that feature, that's what I'd do.

TYL,
--
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: HELP:How can one VM interrupt another running VM ?? [message #42593 is a reply to message #42590] Tue, 03 May 2011 21:41 Go to previous message
Daniel Pittman is currently offline  Daniel Pittman
Messages: 26
Registered: January 2007
Junior Member
No, that is absolutely impossible. The only mechanism for that Linux
provides for this is using RT scheduling and IPC, and those are not
really available to you. What you are describing sounds very much
like cooperative multitasking, which Linux doesn't do at this level.

Are you sure you don't want, for example, a TCP socket passing data to
the "switch to" process, and then to block until the response comes
back?

Daniel

On Tue, May 3, 2011 at 13:27, shule ney <neyshule@gmail.com> wrote:
> Thanks Daniel, but it's not interrupt for that thread/process, the nice
> value just set higher priority, what I want to do is like stop the current
> running process in one VM, context swiching to another process in another
> VM, when this process finishes, switch back to the original VM, of
> course this preempting VM has higher nice value. Is it possible?
>
> 2011/5/3 Daniel Pittman <daniel@rimspace.net>
>>
>> On Tue, May 3, 2011 at 12:58, shule ney <neyshule@gmail.com> wrote:
>>
>> > I was wondering how can I use one VM to interrupt another running VM, is
>> > there any schedular surpport this function, or any control I can use
>> > to implement it. For OpenVZ, is it possible to achieve this?
>>
>> Not as such, no, but: OpenVZ has a single scheduler across all threads
>> / processes in all VEs.  So, if you imagine the scheduler as working
>> on a single system with all those tasks the normal rules of process
>> scheduling apply.
>>
>> Which means that if you set your higher priority stuff to a high nice
>> level, or real-time priority, it will take precedence over another VE
>> that runs lower priority stuff.
>>
>> Finally, if you assign appropriate CPU shares to the VEs you can
>> ensure that they will get all the time divided appropriately at a high
>> level.
>>
>> Regards,
>>    Daniel
>>
>> PS: Native Linux doesn't support this either. :)
>>
>> --
>> ⎋ Puppet Labs Developer – http://puppetlabs.com
>> ✉ Daniel Pittman <daniel@rimspace.net>
>> ✆ Contact me via gtalk, email, or phone: +1 (503) 893-2285
>> ♲ Made with 100 percent post-consumer electrons
>>
--
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <daniel@rimspace.net>
✆ Contact me via gtalk, email, or phone: +1 (503) 893-2285
♲ Made with 100 percent post-consumer electrons
Previous Topic: glusterfs/moosefs/etc as openvz backend?
Next Topic: (no subject)
Goto Forum:
  


Current Time: Thu Aug 15 02:15:52 GMT 2024

Total time taken to generate the page: 0.02775 seconds