* How to Stop scheduler
@ 2009-11-02 21:02 Pankaj Parakh
2009-11-03 11:48 ` George Dunlap
0 siblings, 1 reply; 17+ messages in thread
From: Pankaj Parakh @ 2009-11-02 21:02 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel
Hi All,
I am working on a project wherein I wanted to stop the scheduling
activity in hypervisor through 'generic' part of scheduler, I have lil
confusion as to what all things I need to mask/stop for disabling
hypervisor to schedule any vcpu untill I want.
Issues which I can think are about I/O waits or Zombie VCPUs. But how
to tackle them... I dont know..
I wanted to know what all responsibility the generic scheduler holds
in hypervisor,
Any type of info or pointer can be useful.
Thanks
Pankaj Parakh
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-02 21:02 How to Stop scheduler Pankaj Parakh
@ 2009-11-03 11:48 ` George Dunlap
2009-11-03 11:58 ` George Dunlap
2009-11-03 19:02 ` Pankaj Parakh
0 siblings, 2 replies; 17+ messages in thread
From: George Dunlap @ 2009-11-03 11:48 UTC (permalink / raw)
To: Pankaj Parakh; +Cc: xen-devel
Do you mean that you want to stop one specific vcpu / domain from
being scheduled?
If so, you're looking for the following functions:
vcpu_pause(), vcpu_unpause()
domain_pause(), domain_unpause().
They're defined in xen/common/domain.c.
-George
On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh <me.pankajparakh@gmail.com> wrote:
> Hi All,
>
> I am working on a project wherein I wanted to stop the scheduling
> activity in hypervisor through 'generic' part of scheduler, I have lil
> confusion as to what all things I need to mask/stop for disabling
> hypervisor to schedule any vcpu untill I want.
>
> Issues which I can think are about I/O waits or Zombie VCPUs. But how
> to tackle them... I dont know..
>
> I wanted to know what all responsibility the generic scheduler holds
> in hypervisor,
>
> Any type of info or pointer can be useful.
>
> Thanks
> Pankaj Parakh
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-03 11:48 ` George Dunlap
@ 2009-11-03 11:58 ` George Dunlap
2009-11-03 19:02 ` Pankaj Parakh
1 sibling, 0 replies; 17+ messages in thread
From: George Dunlap @ 2009-11-03 11:58 UTC (permalink / raw)
To: Pankaj Parakh; +Cc: xen-devel
But beware of deadlocks. :-)On Tue, Nov 3, 2009 at 11:48 AM, George
Dunlap <George.Dunlap@eu.citrix.com> wrote:
> Do you mean that you want to stop one specific vcpu / domain from
> being scheduled?
>
> If so, you're looking for the following functions:
> vcpu_pause(), vcpu_unpause()
> domain_pause(), domain_unpause().
>
> They're defined in xen/common/domain.c.
But beware of deadlocks. :-)
-George
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-03 11:48 ` George Dunlap
2009-11-03 11:58 ` George Dunlap
@ 2009-11-03 19:02 ` Pankaj Parakh
2009-11-03 19:11 ` George Dunlap
1 sibling, 1 reply; 17+ messages in thread
From: Pankaj Parakh @ 2009-11-03 19:02 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel
If I pause a vcpu/domain using those functions, say if a domain's I/O
request over then its interrupt will raise and it can restart its
scheduling rite..?? How this interrupts are/ can be queued so that
when the vcpu is in pause state, it should nat change its state and
when it come back to wait state, those interrupt will not be lost..
On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
<George.Dunlap@eu.citrix.com> wrote:
> Do you mean that you want to stop one specific vcpu / domain from
> being scheduled?
>
> If so, you're looking for the following functions:
> vcpu_pause(), vcpu_unpause()
> domain_pause(), domain_unpause().
>
> They're defined in xen/common/domain.c.
>
> -George
>
>
> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh <me.pankajparakh@gmail.com> wrote:
>> Hi All,
>>
>> I am working on a project wherein I wanted to stop the scheduling
>> activity in hypervisor through 'generic' part of scheduler, I have lil
>> confusion as to what all things I need to mask/stop for disabling
>> hypervisor to schedule any vcpu untill I want.
>>
>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
>> to tackle them... I dont know..
>>
>> I wanted to know what all responsibility the generic scheduler holds
>> in hypervisor,
>>
>> Any type of info or pointer can be useful.
>>
>> Thanks
>> Pankaj Parakh
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>>
>
--
Pankaj Parakh
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-03 19:02 ` Pankaj Parakh
@ 2009-11-03 19:11 ` George Dunlap
2009-11-04 5:38 ` Pankaj Parakh
0 siblings, 1 reply; 17+ messages in thread
From: George Dunlap @ 2009-11-03 19:11 UTC (permalink / raw)
To: Pankaj Parakh; +Cc: xen-devel@lists.xensource.com
If you call vcpu_pause(), it atomically increments a counter in the vcpu
struct. While that counter is non-zero, the vcpu *will not* be
scheduled, interrupts or no. Interrupts will be delivered when it's
scheduled again.
-George
Pankaj Parakh wrote:
> If I pause a vcpu/domain using those functions, say if a domain's I/O
> request over then its interrupt will raise and it can restart its
> scheduling rite..?? How this interrupts are/ can be queued so that
> when the vcpu is in pause state, it should nat change its state and
> when it come back to wait state, those interrupt will not be lost..
>
> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
> <George.Dunlap@eu.citrix.com> wrote:
>
>> Do you mean that you want to stop one specific vcpu / domain from
>> being scheduled?
>>
>> If so, you're looking for the following functions:
>> vcpu_pause(), vcpu_unpause()
>> domain_pause(), domain_unpause().
>>
>> They're defined in xen/common/domain.c.
>>
>> -George
>>
>>
>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh <me.pankajparakh@gmail.com> wrote:
>>
>>> Hi All,
>>>
>>> I am working on a project wherein I wanted to stop the scheduling
>>> activity in hypervisor through 'generic' part of scheduler, I have lil
>>> confusion as to what all things I need to mask/stop for disabling
>>> hypervisor to schedule any vcpu untill I want.
>>>
>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
>>> to tackle them... I dont know..
>>>
>>> I wanted to know what all responsibility the generic scheduler holds
>>> in hypervisor,
>>>
>>> Any type of info or pointer can be useful.
>>>
>>> Thanks
>>> Pankaj Parakh
>>>
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@lists.xensource.com
>>> http://lists.xensource.com/xen-devel
>>>
>>>
>
>
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-03 19:11 ` George Dunlap
@ 2009-11-04 5:38 ` Pankaj Parakh
2009-11-04 5:59 ` Pankaj Parakh
2009-11-04 6:02 ` James (song wei)
0 siblings, 2 replies; 17+ messages in thread
From: Pankaj Parakh @ 2009-11-04 5:38 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel@lists.xensource.com
So is that means there will be no interrupt loss, and also clock in
the paused domain will be in right and expected time.. ??
On Wed, Nov 4, 2009 at 12:41 AM, George Dunlap
<george.dunlap@eu.citrix.com> wrote:
> If you call vcpu_pause(), it atomically increments a counter in the vcpu
> struct. While that counter is non-zero, the vcpu *will not* be scheduled,
> interrupts or no. Interrupts will be delivered when it's scheduled again.
>
> -George
>
> Pankaj Parakh wrote:
>>
>> If I pause a vcpu/domain using those functions, say if a domain's I/O
>> request over then its interrupt will raise and it can restart its
>> scheduling rite..?? How this interrupts are/ can be queued so that
>> when the vcpu is in pause state, it should nat change its state and
>> when it come back to wait state, those interrupt will not be lost..
>>
>> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
>> <George.Dunlap@eu.citrix.com> wrote:
>>
>>>
>>> Do you mean that you want to stop one specific vcpu / domain from
>>> being scheduled?
>>>
>>> If so, you're looking for the following functions:
>>> vcpu_pause(), vcpu_unpause()
>>> domain_pause(), domain_unpause().
>>>
>>> They're defined in xen/common/domain.c.
>>>
>>> -George
>>>
>>>
>>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh <me.pankajparakh@gmail.com>
>>> wrote:
>>>
>>>>
>>>> Hi All,
>>>>
>>>> I am working on a project wherein I wanted to stop the scheduling
>>>> activity in hypervisor through 'generic' part of scheduler, I have lil
>>>> confusion as to what all things I need to mask/stop for disabling
>>>> hypervisor to schedule any vcpu untill I want.
>>>>
>>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
>>>> to tackle them... I dont know..
>>>>
>>>> I wanted to know what all responsibility the generic scheduler holds
>>>> in hypervisor,
>>>>
>>>> Any type of info or pointer can be useful.
>>>>
>>>> Thanks
>>>> Pankaj Parakh
>>>>
>>>> _______________________________________________
>>>> Xen-devel mailing list
>>>> Xen-devel@lists.xensource.com
>>>> http://lists.xensource.com/xen-devel
>>>>
>>>>
>>
>>
>>
>>
>
>
--
Pankaj Parakh
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-04 5:38 ` Pankaj Parakh
@ 2009-11-04 5:59 ` Pankaj Parakh
2009-11-04 11:39 ` George Dunlap
2009-11-04 6:02 ` James (song wei)
1 sibling, 1 reply; 17+ messages in thread
From: Pankaj Parakh @ 2009-11-04 5:59 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel@lists.xensource.com
[-- Attachment #1.1: Type: text/plain, Size: 2554 bytes --]
If I take domain_update_lock for a domain, what will happen to its
interrupts for IO completions or any other type..??
And will it be scheduled if I hold that lock..??
On Wed, Nov 4, 2009 at 11:08 AM, Pankaj Parakh <me.pankajparakh@gmail.com>wrote:
> So is that means there will be no interrupt loss, and also clock in
> the paused domain will be in right and expected time.. ??
>
> On Wed, Nov 4, 2009 at 12:41 AM, George Dunlap
> <george.dunlap@eu.citrix.com> wrote:
> > If you call vcpu_pause(), it atomically increments a counter in the vcpu
> > struct. While that counter is non-zero, the vcpu *will not* be
> scheduled,
> > interrupts or no. Interrupts will be delivered when it's scheduled
> again.
> >
> > -George
> >
> > Pankaj Parakh wrote:
> >>
> >> If I pause a vcpu/domain using those functions, say if a domain's I/O
> >> request over then its interrupt will raise and it can restart its
> >> scheduling rite..?? How this interrupts are/ can be queued so that
> >> when the vcpu is in pause state, it should nat change its state and
> >> when it come back to wait state, those interrupt will not be lost..
> >>
> >> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
> >> <George.Dunlap@eu.citrix.com> wrote:
> >>
> >>>
> >>> Do you mean that you want to stop one specific vcpu / domain from
> >>> being scheduled?
> >>>
> >>> If so, you're looking for the following functions:
> >>> vcpu_pause(), vcpu_unpause()
> >>> domain_pause(), domain_unpause().
> >>>
> >>> They're defined in xen/common/domain.c.
> >>>
> >>> -George
> >>>
> >>>
> >>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh <
> me.pankajparakh@gmail.com>
> >>> wrote:
> >>>
> >>>>
> >>>> Hi All,
> >>>>
> >>>> I am working on a project wherein I wanted to stop the scheduling
> >>>> activity in hypervisor through 'generic' part of scheduler, I have lil
> >>>> confusion as to what all things I need to mask/stop for disabling
> >>>> hypervisor to schedule any vcpu untill I want.
> >>>>
> >>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
> >>>> to tackle them... I dont know..
> >>>>
> >>>> I wanted to know what all responsibility the generic scheduler holds
> >>>> in hypervisor,
> >>>>
> >>>> Any type of info or pointer can be useful.
> >>>>
> >>>> Thanks
> >>>> Pankaj Parakh
> >>>>
> >>>> _______________________________________________
> >>>> Xen-devel mailing list
> >>>> Xen-devel@lists.xensource.com
> >>>> http://lists.xensource.com/xen-devel
> >>>>
> >>>>
> >>
> >>
> >>
> >>
> >
> >
>
>
>
> --
> Pankaj Parakh
>
--
Pankaj Parakh
[-- Attachment #1.2: Type: text/html, Size: 3996 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-04 5:38 ` Pankaj Parakh
2009-11-04 5:59 ` Pankaj Parakh
@ 2009-11-04 6:02 ` James (song wei)
1 sibling, 0 replies; 17+ messages in thread
From: James (song wei) @ 2009-11-04 6:02 UTC (permalink / raw)
To: xen-devel
IMO, George have say it clearly, interrupt (including timer interrupt) will
be losed until the VCPU or Domain unpaused.
-James (song wei)
Pankaj Parakh wrote:
>
> So is that means there will be no interrupt loss, and also clock in
> the paused domain will be in right and expected time.. ??
>
> On Wed, Nov 4, 2009 at 12:41 AM, George Dunlap
> <george.dunlap@eu.citrix.com> wrote:
>> If you call vcpu_pause(), it atomically increments a counter in the vcpu
>> struct. While that counter is non-zero, the vcpu *will not* be
>> scheduled,
>> interrupts or no. Interrupts will be delivered when it's scheduled
>> again.
>>
>> -George
>>
>> Pankaj Parakh wrote:
>>>
>>> If I pause a vcpu/domain using those functions, say if a domain's I/O
>>> request over then its interrupt will raise and it can restart its
>>> scheduling rite..?? How this interrupts are/ can be queued so that
>>> when the vcpu is in pause state, it should nat change its state and
>>> when it come back to wait state, those interrupt will not be lost..
>>>
>>> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
>>> <George.Dunlap@eu.citrix.com> wrote:
>>>
>>>>
>>>> Do you mean that you want to stop one specific vcpu / domain from
>>>> being scheduled?
>>>>
>>>> If so, you're looking for the following functions:
>>>> vcpu_pause(), vcpu_unpause()
>>>> domain_pause(), domain_unpause().
>>>>
>>>> They're defined in xen/common/domain.c.
>>>>
>>>> -George
>>>>
>>>>
>>>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh
>>>> <me.pankajparakh@gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>> Hi All,
>>>>>
>>>>> I am working on a project wherein I wanted to stop the scheduling
>>>>> activity in hypervisor through 'generic' part of scheduler, I have lil
>>>>> confusion as to what all things I need to mask/stop for disabling
>>>>> hypervisor to schedule any vcpu untill I want.
>>>>>
>>>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
>>>>> to tackle them... I dont know..
>>>>>
>>>>> I wanted to know what all responsibility the generic scheduler holds
>>>>> in hypervisor,
>>>>>
>>>>> Any type of info or pointer can be useful.
>>>>>
>>>>> Thanks
>>>>> Pankaj Parakh
>>>>>
>>>>> _______________________________________________
>>>>> Xen-devel mailing list
>>>>> Xen-devel@lists.xensource.com
>>>>> http://lists.xensource.com/xen-devel
>>>>>
>>>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
>
> --
> Pankaj Parakh
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
--
View this message in context: http://old.nabble.com/How-to-Stop-scheduler-tp26170683p26191458.html
Sent from the Xen - Dev mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-04 5:59 ` Pankaj Parakh
@ 2009-11-04 11:39 ` George Dunlap
2009-11-05 0:43 ` Pankaj Parakh
0 siblings, 1 reply; 17+ messages in thread
From: George Dunlap @ 2009-11-04 11:39 UTC (permalink / raw)
To: Pankaj Parakh; +Cc: xen-devel@lists.xensource.com
On Wed, Nov 4, 2009 at 5:59 AM, Pankaj Parakh <me.pankajparakh@gmail.com> wrote:
> If I take domain_update_lock for a domain, what will happen to its
> interrupts for IO completions or any other type..??
> And will it be scheduled if I hold that lock..??
Have you looked at the interrupt delivery / IO completion path, or the
scheduler path, to see if those are affected by the
domain_update_lock()?
Xen is a bit of a twisted web; sometimes you just have to follow a web
of logic around to find out what you're looking for; then, once you've
come to a conclusion, test it by writing some code.
For the scheduling question, you might start with looking at vcpu_runnable().
Peace,
-George
>
> On Wed, Nov 4, 2009 at 11:08 AM, Pankaj Parakh <me.pankajparakh@gmail.com>
> wrote:
>>
>> So is that means there will be no interrupt loss, and also clock in
>> the paused domain will be in right and expected time.. ??
>>
>> On Wed, Nov 4, 2009 at 12:41 AM, George Dunlap
>> <george.dunlap@eu.citrix.com> wrote:
>> > If you call vcpu_pause(), it atomically increments a counter in the vcpu
>> > struct. While that counter is non-zero, the vcpu *will not* be
>> > scheduled,
>> > interrupts or no. Interrupts will be delivered when it's scheduled
>> > again.
>> >
>> > -George
>> >
>> > Pankaj Parakh wrote:
>> >>
>> >> If I pause a vcpu/domain using those functions, say if a domain's I/O
>> >> request over then its interrupt will raise and it can restart its
>> >> scheduling rite..?? How this interrupts are/ can be queued so that
>> >> when the vcpu is in pause state, it should nat change its state and
>> >> when it come back to wait state, those interrupt will not be lost..
>> >>
>> >> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
>> >> <George.Dunlap@eu.citrix.com> wrote:
>> >>
>> >>>
>> >>> Do you mean that you want to stop one specific vcpu / domain from
>> >>> being scheduled?
>> >>>
>> >>> If so, you're looking for the following functions:
>> >>> vcpu_pause(), vcpu_unpause()
>> >>> domain_pause(), domain_unpause().
>> >>>
>> >>> They're defined in xen/common/domain.c.
>> >>>
>> >>> -George
>> >>>
>> >>>
>> >>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh
>> >>> <me.pankajparakh@gmail.com>
>> >>> wrote:
>> >>>
>> >>>>
>> >>>> Hi All,
>> >>>>
>> >>>> I am working on a project wherein I wanted to stop the scheduling
>> >>>> activity in hypervisor through 'generic' part of scheduler, I have
>> >>>> lil
>> >>>> confusion as to what all things I need to mask/stop for disabling
>> >>>> hypervisor to schedule any vcpu untill I want.
>> >>>>
>> >>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
>> >>>> to tackle them... I dont know..
>> >>>>
>> >>>> I wanted to know what all responsibility the generic scheduler holds
>> >>>> in hypervisor,
>> >>>>
>> >>>> Any type of info or pointer can be useful.
>> >>>>
>> >>>> Thanks
>> >>>> Pankaj Parakh
>> >>>>
>> >>>> _______________________________________________
>> >>>> Xen-devel mailing list
>> >>>> Xen-devel@lists.xensource.com
>> >>>> http://lists.xensource.com/xen-devel
>> >>>>
>> >>>>
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>>
>>
>>
>> --
>> Pankaj Parakh
>
>
>
> --
> Pankaj Parakh
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-04 11:39 ` George Dunlap
@ 2009-11-05 0:43 ` Pankaj Parakh
2009-11-05 9:55 ` George Dunlap
0 siblings, 1 reply; 17+ messages in thread
From: Pankaj Parakh @ 2009-11-05 0:43 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel@lists.xensource.com
How can I schedule idle vcpu voluntarily without using schedule() ??
Is there any function for it already defined, or do I have to follow
some steps.. ??
On Wed, Nov 4, 2009 at 5:09 PM, George Dunlap
<George.Dunlap@eu.citrix.com> wrote:
>
> On Wed, Nov 4, 2009 at 5:59 AM, Pankaj Parakh <me.pankajparakh@gmail.com> wrote:
> > If I take domain_update_lock for a domain, what will happen to its
> > interrupts for IO completions or any other type..??
> > And will it be scheduled if I hold that lock..??
>
> Have you looked at the interrupt delivery / IO completion path, or the
> scheduler path, to see if those are affected by the
> domain_update_lock()?
>
> Xen is a bit of a twisted web; sometimes you just have to follow a web
> of logic around to find out what you're looking for; then, once you've
> come to a conclusion, test it by writing some code.
>
> For the scheduling question, you might start with looking at vcpu_runnable().
>
> Peace,
> -George
>
> >
> > On Wed, Nov 4, 2009 at 11:08 AM, Pankaj Parakh <me.pankajparakh@gmail.com>
> > wrote:
> >>
> >> So is that means there will be no interrupt loss, and also clock in
> >> the paused domain will be in right and expected time.. ??
> >>
> >> On Wed, Nov 4, 2009 at 12:41 AM, George Dunlap
> >> <george.dunlap@eu.citrix.com> wrote:
> >> > If you call vcpu_pause(), it atomically increments a counter in the vcpu
> >> > struct. While that counter is non-zero, the vcpu *will not* be
> >> > scheduled,
> >> > interrupts or no. Interrupts will be delivered when it's scheduled
> >> > again.
> >> >
> >> > -George
> >> >
> >> > Pankaj Parakh wrote:
> >> >>
> >> >> If I pause a vcpu/domain using those functions, say if a domain's I/O
> >> >> request over then its interrupt will raise and it can restart its
> >> >> scheduling rite..?? How this interrupts are/ can be queued so that
> >> >> when the vcpu is in pause state, it should nat change its state and
> >> >> when it come back to wait state, those interrupt will not be lost..
> >> >>
> >> >> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
> >> >> <George.Dunlap@eu.citrix.com> wrote:
> >> >>
> >> >>>
> >> >>> Do you mean that you want to stop one specific vcpu / domain from
> >> >>> being scheduled?
> >> >>>
> >> >>> If so, you're looking for the following functions:
> >> >>> vcpu_pause(), vcpu_unpause()
> >> >>> domain_pause(), domain_unpause().
> >> >>>
> >> >>> They're defined in xen/common/domain.c.
> >> >>>
> >> >>> -George
> >> >>>
> >> >>>
> >> >>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh
> >> >>> <me.pankajparakh@gmail.com>
> >> >>> wrote:
> >> >>>
> >> >>>>
> >> >>>> Hi All,
> >> >>>>
> >> >>>> I am working on a project wherein I wanted to stop the scheduling
> >> >>>> activity in hypervisor through 'generic' part of scheduler, I have
> >> >>>> lil
> >> >>>> confusion as to what all things I need to mask/stop for disabling
> >> >>>> hypervisor to schedule any vcpu untill I want.
> >> >>>>
> >> >>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
> >> >>>> to tackle them... I dont know..
> >> >>>>
> >> >>>> I wanted to know what all responsibility the generic scheduler holds
> >> >>>> in hypervisor,
> >> >>>>
> >> >>>> Any type of info or pointer can be useful.
> >> >>>>
> >> >>>> Thanks
> >> >>>> Pankaj Parakh
> >> >>>>
> >> >>>> _______________________________________________
> >> >>>> Xen-devel mailing list
> >> >>>> Xen-devel@lists.xensource.com
> >> >>>> http://lists.xensource.com/xen-devel
> >> >>>>
> >> >>>>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Pankaj Parakh
> >
> >
> >
> > --
> > Pankaj Parakh
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
> >
> >
--
Pankaj Parakh
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-05 0:43 ` Pankaj Parakh
@ 2009-11-05 9:55 ` George Dunlap
2009-11-05 10:27 ` George Dunlap
2009-11-10 6:48 ` Pankaj Parakh
0 siblings, 2 replies; 17+ messages in thread
From: George Dunlap @ 2009-11-05 9:55 UTC (permalink / raw)
To: Pankaj Parakh; +Cc: xen-devel@lists.xensource.com
I assume you mean, once you've paused current(), how do you get into
the scheduler to actually get it off the cpu?
In Linux, you can call schedule() because each process has its own
kernel stack allocated to it; the stack "remembers" where each process
was in the kernel, so you can return from schedule() at the same place
in the kernel once you're scheduled again.
Xen only has one stack per cpu, so it cannot keep track of where *in
the hypervisor* a vcpu is that gets scheduled out. Therefore, you
can't call schedule() directly, as it would throw away the stack. You
must raise SCHEDULE_SOFTIRQ on the current cpu, and then return back
to the guest. On the way out, the softirq will call schedule() and
switch to another vcpu if necessary. (It will only schedule the idle
process if there are no runnable vcpus.)
grep for SCHEDULE_SOFTIRQ to see examples of how this is used in Xen.
-George
On Thu, Nov 5, 2009 at 12:43 AM, Pankaj Parakh
<me.pankajparakh@gmail.com> wrote:
> How can I schedule idle vcpu voluntarily without using schedule() ??
> Is there any function for it already defined, or do I have to follow
> some steps.. ??
>
> On Wed, Nov 4, 2009 at 5:09 PM, George Dunlap
> <George.Dunlap@eu.citrix.com> wrote:
>>
>> On Wed, Nov 4, 2009 at 5:59 AM, Pankaj Parakh <me.pankajparakh@gmail.com> wrote:
>> > If I take domain_update_lock for a domain, what will happen to its
>> > interrupts for IO completions or any other type..??
>> > And will it be scheduled if I hold that lock..??
>>
>> Have you looked at the interrupt delivery / IO completion path, or the
>> scheduler path, to see if those are affected by the
>> domain_update_lock()?
>>
>> Xen is a bit of a twisted web; sometimes you just have to follow a web
>> of logic around to find out what you're looking for; then, once you've
>> come to a conclusion, test it by writing some code.
>>
>> For the scheduling question, you might start with looking at vcpu_runnable().
>>
>> Peace,
>> -George
>>
>> >
>> > On Wed, Nov 4, 2009 at 11:08 AM, Pankaj Parakh <me.pankajparakh@gmail.com>
>> > wrote:
>> >>
>> >> So is that means there will be no interrupt loss, and also clock in
>> >> the paused domain will be in right and expected time.. ??
>> >>
>> >> On Wed, Nov 4, 2009 at 12:41 AM, George Dunlap
>> >> <george.dunlap@eu.citrix.com> wrote:
>> >> > If you call vcpu_pause(), it atomically increments a counter in the vcpu
>> >> > struct. While that counter is non-zero, the vcpu *will not* be
>> >> > scheduled,
>> >> > interrupts or no. Interrupts will be delivered when it's scheduled
>> >> > again.
>> >> >
>> >> > -George
>> >> >
>> >> > Pankaj Parakh wrote:
>> >> >>
>> >> >> If I pause a vcpu/domain using those functions, say if a domain's I/O
>> >> >> request over then its interrupt will raise and it can restart its
>> >> >> scheduling rite..?? How this interrupts are/ can be queued so that
>> >> >> when the vcpu is in pause state, it should nat change its state and
>> >> >> when it come back to wait state, those interrupt will not be lost..
>> >> >>
>> >> >> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
>> >> >> <George.Dunlap@eu.citrix.com> wrote:
>> >> >>
>> >> >>>
>> >> >>> Do you mean that you want to stop one specific vcpu / domain from
>> >> >>> being scheduled?
>> >> >>>
>> >> >>> If so, you're looking for the following functions:
>> >> >>> vcpu_pause(), vcpu_unpause()
>> >> >>> domain_pause(), domain_unpause().
>> >> >>>
>> >> >>> They're defined in xen/common/domain.c.
>> >> >>>
>> >> >>> -George
>> >> >>>
>> >> >>>
>> >> >>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh
>> >> >>> <me.pankajparakh@gmail.com>
>> >> >>> wrote:
>> >> >>>
>> >> >>>>
>> >> >>>> Hi All,
>> >> >>>>
>> >> >>>> I am working on a project wherein I wanted to stop the scheduling
>> >> >>>> activity in hypervisor through 'generic' part of scheduler, I have
>> >> >>>> lil
>> >> >>>> confusion as to what all things I need to mask/stop for disabling
>> >> >>>> hypervisor to schedule any vcpu untill I want.
>> >> >>>>
>> >> >>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
>> >> >>>> to tackle them... I dont know..
>> >> >>>>
>> >> >>>> I wanted to know what all responsibility the generic scheduler holds
>> >> >>>> in hypervisor,
>> >> >>>>
>> >> >>>> Any type of info or pointer can be useful.
>> >> >>>>
>> >> >>>> Thanks
>> >> >>>> Pankaj Parakh
>> >> >>>>
>> >> >>>> _______________________________________________
>> >> >>>> Xen-devel mailing list
>> >> >>>> Xen-devel@lists.xensource.com
>> >> >>>> http://lists.xensource.com/xen-devel
>> >> >>>>
>> >> >>>>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Pankaj Parakh
>> >
>> >
>> >
>> > --
>> > Pankaj Parakh
>> >
>> > _______________________________________________
>> > Xen-devel mailing list
>> > Xen-devel@lists.xensource.com
>> > http://lists.xensource.com/xen-devel
>> >
>> >
>
>
>
> --
> Pankaj Parakh
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-05 9:55 ` George Dunlap
@ 2009-11-05 10:27 ` George Dunlap
2009-11-05 18:06 ` Pankaj Parakh
2009-11-10 6:48 ` Pankaj Parakh
1 sibling, 1 reply; 17+ messages in thread
From: George Dunlap @ 2009-11-05 10:27 UTC (permalink / raw)
To: Pankaj Parakh; +Cc: xen-devel@lists.xensource.com
BTW, for the benefit of posterity, would you post a patch with the
working sched_rr.c to the list, so that if in the future someone tries
to use the code from that book, we can point them to it?
Thanks,
-George
On Thu, Nov 5, 2009 at 9:55 AM, George Dunlap
<George.Dunlap@eu.citrix.com> wrote:
> I assume you mean, once you've paused current(), how do you get into
> the scheduler to actually get it off the cpu?
>
> In Linux, you can call schedule() because each process has its own
> kernel stack allocated to it; the stack "remembers" where each process
> was in the kernel, so you can return from schedule() at the same place
> in the kernel once you're scheduled again.
>
> Xen only has one stack per cpu, so it cannot keep track of where *in
> the hypervisor* a vcpu is that gets scheduled out. Therefore, you
> can't call schedule() directly, as it would throw away the stack. You
> must raise SCHEDULE_SOFTIRQ on the current cpu, and then return back
> to the guest. On the way out, the softirq will call schedule() and
> switch to another vcpu if necessary. (It will only schedule the idle
> process if there are no runnable vcpus.)
>
> grep for SCHEDULE_SOFTIRQ to see examples of how this is used in Xen.
>
> -George
>
> On Thu, Nov 5, 2009 at 12:43 AM, Pankaj Parakh
> <me.pankajparakh@gmail.com> wrote:
>> How can I schedule idle vcpu voluntarily without using schedule() ??
>> Is there any function for it already defined, or do I have to follow
>> some steps.. ??
>>
>> On Wed, Nov 4, 2009 at 5:09 PM, George Dunlap
>> <George.Dunlap@eu.citrix.com> wrote:
>>>
>>> On Wed, Nov 4, 2009 at 5:59 AM, Pankaj Parakh <me.pankajparakh@gmail.com> wrote:
>>> > If I take domain_update_lock for a domain, what will happen to its
>>> > interrupts for IO completions or any other type..??
>>> > And will it be scheduled if I hold that lock..??
>>>
>>> Have you looked at the interrupt delivery / IO completion path, or the
>>> scheduler path, to see if those are affected by the
>>> domain_update_lock()?
>>>
>>> Xen is a bit of a twisted web; sometimes you just have to follow a web
>>> of logic around to find out what you're looking for; then, once you've
>>> come to a conclusion, test it by writing some code.
>>>
>>> For the scheduling question, you might start with looking at vcpu_runnable().
>>>
>>> Peace,
>>> -George
>>>
>>> >
>>> > On Wed, Nov 4, 2009 at 11:08 AM, Pankaj Parakh <me.pankajparakh@gmail.com>
>>> > wrote:
>>> >>
>>> >> So is that means there will be no interrupt loss, and also clock in
>>> >> the paused domain will be in right and expected time.. ??
>>> >>
>>> >> On Wed, Nov 4, 2009 at 12:41 AM, George Dunlap
>>> >> <george.dunlap@eu.citrix.com> wrote:
>>> >> > If you call vcpu_pause(), it atomically increments a counter in the vcpu
>>> >> > struct. While that counter is non-zero, the vcpu *will not* be
>>> >> > scheduled,
>>> >> > interrupts or no. Interrupts will be delivered when it's scheduled
>>> >> > again.
>>> >> >
>>> >> > -George
>>> >> >
>>> >> > Pankaj Parakh wrote:
>>> >> >>
>>> >> >> If I pause a vcpu/domain using those functions, say if a domain's I/O
>>> >> >> request over then its interrupt will raise and it can restart its
>>> >> >> scheduling rite..?? How this interrupts are/ can be queued so that
>>> >> >> when the vcpu is in pause state, it should nat change its state and
>>> >> >> when it come back to wait state, those interrupt will not be lost..
>>> >> >>
>>> >> >> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
>>> >> >> <George.Dunlap@eu.citrix.com> wrote:
>>> >> >>
>>> >> >>>
>>> >> >>> Do you mean that you want to stop one specific vcpu / domain from
>>> >> >>> being scheduled?
>>> >> >>>
>>> >> >>> If so, you're looking for the following functions:
>>> >> >>> vcpu_pause(), vcpu_unpause()
>>> >> >>> domain_pause(), domain_unpause().
>>> >> >>>
>>> >> >>> They're defined in xen/common/domain.c.
>>> >> >>>
>>> >> >>> -George
>>> >> >>>
>>> >> >>>
>>> >> >>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh
>>> >> >>> <me.pankajparakh@gmail.com>
>>> >> >>> wrote:
>>> >> >>>
>>> >> >>>>
>>> >> >>>> Hi All,
>>> >> >>>>
>>> >> >>>> I am working on a project wherein I wanted to stop the scheduling
>>> >> >>>> activity in hypervisor through 'generic' part of scheduler, I have
>>> >> >>>> lil
>>> >> >>>> confusion as to what all things I need to mask/stop for disabling
>>> >> >>>> hypervisor to schedule any vcpu untill I want.
>>> >> >>>>
>>> >> >>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
>>> >> >>>> to tackle them... I dont know..
>>> >> >>>>
>>> >> >>>> I wanted to know what all responsibility the generic scheduler holds
>>> >> >>>> in hypervisor,
>>> >> >>>>
>>> >> >>>> Any type of info or pointer can be useful.
>>> >> >>>>
>>> >> >>>> Thanks
>>> >> >>>> Pankaj Parakh
>>> >> >>>>
>>> >> >>>> _______________________________________________
>>> >> >>>> Xen-devel mailing list
>>> >> >>>> Xen-devel@lists.xensource.com
>>> >> >>>> http://lists.xensource.com/xen-devel
>>> >> >>>>
>>> >> >>>>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Pankaj Parakh
>>> >
>>> >
>>> >
>>> > --
>>> > Pankaj Parakh
>>> >
>>> > _______________________________________________
>>> > Xen-devel mailing list
>>> > Xen-devel@lists.xensource.com
>>> > http://lists.xensource.com/xen-devel
>>> >
>>> >
>>
>>
>>
>> --
>> Pankaj Parakh
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-05 10:27 ` George Dunlap
@ 2009-11-05 18:06 ` Pankaj Parakh
0 siblings, 0 replies; 17+ messages in thread
From: Pankaj Parakh @ 2009-11-05 18:06 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel@lists.xensource.com
Yes George,
I'll do that as soon as it is in right shape, there is still some
problems there to which I am unable to give time to.
On Thu, Nov 5, 2009 at 3:57 PM, George Dunlap
<George.Dunlap@eu.citrix.com> wrote:
>
> BTW, for the benefit of posterity, would you post a patch with the
> working sched_rr.c to the list, so that if in the future someone tries
> to use the code from that book, we can point them to it?
>
> Thanks,
> -George
>
> On Thu, Nov 5, 2009 at 9:55 AM, George Dunlap
> <George.Dunlap@eu.citrix.com> wrote:
> > I assume you mean, once you've paused current(), how do you get into
> > the scheduler to actually get it off the cpu?
> >
> > In Linux, you can call schedule() because each process has its own
> > kernel stack allocated to it; the stack "remembers" where each process
> > was in the kernel, so you can return from schedule() at the same place
> > in the kernel once you're scheduled again.
> >
> > Xen only has one stack per cpu, so it cannot keep track of where *in
> > the hypervisor* a vcpu is that gets scheduled out. Therefore, you
> > can't call schedule() directly, as it would throw away the stack. You
> > must raise SCHEDULE_SOFTIRQ on the current cpu, and then return back
> > to the guest. On the way out, the softirq will call schedule() and
> > switch to another vcpu if necessary. (It will only schedule the idle
> > process if there are no runnable vcpus.)
> >
> > grep for SCHEDULE_SOFTIRQ to see examples of how this is used in Xen.
> >
> > -George
> >
> > On Thu, Nov 5, 2009 at 12:43 AM, Pankaj Parakh
> > <me.pankajparakh@gmail.com> wrote:
> >> How can I schedule idle vcpu voluntarily without using schedule() ??
> >> Is there any function for it already defined, or do I have to follow
> >> some steps.. ??
> >>
> >> On Wed, Nov 4, 2009 at 5:09 PM, George Dunlap
> >> <George.Dunlap@eu.citrix.com> wrote:
> >>>
> >>> On Wed, Nov 4, 2009 at 5:59 AM, Pankaj Parakh <me.pankajparakh@gmail.com> wrote:
> >>> > If I take domain_update_lock for a domain, what will happen to its
> >>> > interrupts for IO completions or any other type..??
> >>> > And will it be scheduled if I hold that lock..??
> >>>
> >>> Have you looked at the interrupt delivery / IO completion path, or the
> >>> scheduler path, to see if those are affected by the
> >>> domain_update_lock()?
> >>>
> >>> Xen is a bit of a twisted web; sometimes you just have to follow a web
> >>> of logic around to find out what you're looking for; then, once you've
> >>> come to a conclusion, test it by writing some code.
> >>>
> >>> For the scheduling question, you might start with looking at vcpu_runnable().
> >>>
> >>> Peace,
> >>> -George
> >>>
> >>> >
> >>> > On Wed, Nov 4, 2009 at 11:08 AM, Pankaj Parakh <me.pankajparakh@gmail.com>
> >>> > wrote:
> >>> >>
> >>> >> So is that means there will be no interrupt loss, and also clock in
> >>> >> the paused domain will be in right and expected time.. ??
> >>> >>
> >>> >> On Wed, Nov 4, 2009 at 12:41 AM, George Dunlap
> >>> >> <george.dunlap@eu.citrix.com> wrote:
> >>> >> > If you call vcpu_pause(), it atomically increments a counter in the vcpu
> >>> >> > struct. While that counter is non-zero, the vcpu *will not* be
> >>> >> > scheduled,
> >>> >> > interrupts or no. Interrupts will be delivered when it's scheduled
> >>> >> > again.
> >>> >> >
> >>> >> > -George
> >>> >> >
> >>> >> > Pankaj Parakh wrote:
> >>> >> >>
> >>> >> >> If I pause a vcpu/domain using those functions, say if a domain's I/O
> >>> >> >> request over then its interrupt will raise and it can restart its
> >>> >> >> scheduling rite..?? How this interrupts are/ can be queued so that
> >>> >> >> when the vcpu is in pause state, it should nat change its state and
> >>> >> >> when it come back to wait state, those interrupt will not be lost..
> >>> >> >>
> >>> >> >> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
> >>> >> >> <George.Dunlap@eu.citrix.com> wrote:
> >>> >> >>
> >>> >> >>>
> >>> >> >>> Do you mean that you want to stop one specific vcpu / domain from
> >>> >> >>> being scheduled?
> >>> >> >>>
> >>> >> >>> If so, you're looking for the following functions:
> >>> >> >>> vcpu_pause(), vcpu_unpause()
> >>> >> >>> domain_pause(), domain_unpause().
> >>> >> >>>
> >>> >> >>> They're defined in xen/common/domain.c.
> >>> >> >>>
> >>> >> >>> -George
> >>> >> >>>
> >>> >> >>>
> >>> >> >>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh
> >>> >> >>> <me.pankajparakh@gmail.com>
> >>> >> >>> wrote:
> >>> >> >>>
> >>> >> >>>>
> >>> >> >>>> Hi All,
> >>> >> >>>>
> >>> >> >>>> I am working on a project wherein I wanted to stop the scheduling
> >>> >> >>>> activity in hypervisor through 'generic' part of scheduler, I have
> >>> >> >>>> lil
> >>> >> >>>> confusion as to what all things I need to mask/stop for disabling
> >>> >> >>>> hypervisor to schedule any vcpu untill I want.
> >>> >> >>>>
> >>> >> >>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
> >>> >> >>>> to tackle them... I dont know..
> >>> >> >>>>
> >>> >> >>>> I wanted to know what all responsibility the generic scheduler holds
> >>> >> >>>> in hypervisor,
> >>> >> >>>>
> >>> >> >>>> Any type of info or pointer can be useful.
> >>> >> >>>>
> >>> >> >>>> Thanks
> >>> >> >>>> Pankaj Parakh
> >>> >> >>>>
> >>> >> >>>> _______________________________________________
> >>> >> >>>> Xen-devel mailing list
> >>> >> >>>> Xen-devel@lists.xensource.com
> >>> >> >>>> http://lists.xensource.com/xen-devel
> >>> >> >>>>
> >>> >> >>>>
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >
> >>> >> >
> >>> >>
> >>> >>
> >>> >>
> >>> >> --
> >>> >> Pankaj Parakh
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Pankaj Parakh
> >>> >
> >>> > _______________________________________________
> >>> > Xen-devel mailing list
> >>> > Xen-devel@lists.xensource.com
> >>> > http://lists.xensource.com/xen-devel
> >>> >
> >>> >
> >>
> >>
> >>
> >> --
> >> Pankaj Parakh
> >>
> >> _______________________________________________
> >> Xen-devel mailing list
> >> Xen-devel@lists.xensource.com
> >> http://lists.xensource.com/xen-devel
> >>
> >
--
Pankaj Parakh
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-05 9:55 ` George Dunlap
2009-11-05 10:27 ` George Dunlap
@ 2009-11-10 6:48 ` Pankaj Parakh
2009-11-10 7:05 ` Pankaj Parakh
1 sibling, 1 reply; 17+ messages in thread
From: Pankaj Parakh @ 2009-11-10 6:48 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel@lists.xensource.com
How to disable softirq in Xen, if I want that no function should be
able to raise SCHEDULE_SOFTIRQ, how can I do that??
On Thu, Nov 5, 2009 at 3:25 PM, George Dunlap
<George.Dunlap@eu.citrix.com> wrote:
> I assume you mean, once you've paused current(), how do you get into
> the scheduler to actually get it off the cpu?
>
> In Linux, you can call schedule() because each process has its own
> kernel stack allocated to it; the stack "remembers" where each process
> was in the kernel, so you can return from schedule() at the same place
> in the kernel once you're scheduled again.
>
> Xen only has one stack per cpu, so it cannot keep track of where *in
> the hypervisor* a vcpu is that gets scheduled out. Therefore, you
> can't call schedule() directly, as it would throw away the stack. You
> must raise SCHEDULE_SOFTIRQ on the current cpu, and then return back
> to the guest. On the way out, the softirq will call schedule() and
> switch to another vcpu if necessary. (It will only schedule the idle
> process if there are no runnable vcpus.)
>
> grep for SCHEDULE_SOFTIRQ to see examples of how this is used in Xen.
>
> -George
>
> On Thu, Nov 5, 2009 at 12:43 AM, Pankaj Parakh
> <me.pankajparakh@gmail.com> wrote:
>> How can I schedule idle vcpu voluntarily without using schedule() ??
>> Is there any function for it already defined, or do I have to follow
>> some steps.. ??
>>
>> On Wed, Nov 4, 2009 at 5:09 PM, George Dunlap
>> <George.Dunlap@eu.citrix.com> wrote:
>>>
>>> On Wed, Nov 4, 2009 at 5:59 AM, Pankaj Parakh <me.pankajparakh@gmail.com> wrote:
>>> > If I take domain_update_lock for a domain, what will happen to its
>>> > interrupts for IO completions or any other type..??
>>> > And will it be scheduled if I hold that lock..??
>>>
>>> Have you looked at the interrupt delivery / IO completion path, or the
>>> scheduler path, to see if those are affected by the
>>> domain_update_lock()?
>>>
>>> Xen is a bit of a twisted web; sometimes you just have to follow a web
>>> of logic around to find out what you're looking for; then, once you've
>>> come to a conclusion, test it by writing some code.
>>>
>>> For the scheduling question, you might start with looking at vcpu_runnable().
>>>
>>> Peace,
>>> -George
>>>
>>> >
>>> > On Wed, Nov 4, 2009 at 11:08 AM, Pankaj Parakh <me.pankajparakh@gmail.com>
>>> > wrote:
>>> >>
>>> >> So is that means there will be no interrupt loss, and also clock in
>>> >> the paused domain will be in right and expected time.. ??
>>> >>
>>> >> On Wed, Nov 4, 2009 at 12:41 AM, George Dunlap
>>> >> <george.dunlap@eu.citrix.com> wrote:
>>> >> > If you call vcpu_pause(), it atomically increments a counter in the vcpu
>>> >> > struct. While that counter is non-zero, the vcpu *will not* be
>>> >> > scheduled,
>>> >> > interrupts or no. Interrupts will be delivered when it's scheduled
>>> >> > again.
>>> >> >
>>> >> > -George
>>> >> >
>>> >> > Pankaj Parakh wrote:
>>> >> >>
>>> >> >> If I pause a vcpu/domain using those functions, say if a domain's I/O
>>> >> >> request over then its interrupt will raise and it can restart its
>>> >> >> scheduling rite..?? How this interrupts are/ can be queued so that
>>> >> >> when the vcpu is in pause state, it should nat change its state and
>>> >> >> when it come back to wait state, those interrupt will not be lost..
>>> >> >>
>>> >> >> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
>>> >> >> <George.Dunlap@eu.citrix.com> wrote:
>>> >> >>
>>> >> >>>
>>> >> >>> Do you mean that you want to stop one specific vcpu / domain from
>>> >> >>> being scheduled?
>>> >> >>>
>>> >> >>> If so, you're looking for the following functions:
>>> >> >>> vcpu_pause(), vcpu_unpause()
>>> >> >>> domain_pause(), domain_unpause().
>>> >> >>>
>>> >> >>> They're defined in xen/common/domain.c.
>>> >> >>>
>>> >> >>> -George
>>> >> >>>
>>> >> >>>
>>> >> >>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh
>>> >> >>> <me.pankajparakh@gmail.com>
>>> >> >>> wrote:
>>> >> >>>
>>> >> >>>>
>>> >> >>>> Hi All,
>>> >> >>>>
>>> >> >>>> I am working on a project wherein I wanted to stop the scheduling
>>> >> >>>> activity in hypervisor through 'generic' part of scheduler, I have
>>> >> >>>> lil
>>> >> >>>> confusion as to what all things I need to mask/stop for disabling
>>> >> >>>> hypervisor to schedule any vcpu untill I want.
>>> >> >>>>
>>> >> >>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
>>> >> >>>> to tackle them... I dont know..
>>> >> >>>>
>>> >> >>>> I wanted to know what all responsibility the generic scheduler holds
>>> >> >>>> in hypervisor,
>>> >> >>>>
>>> >> >>>> Any type of info or pointer can be useful.
>>> >> >>>>
>>> >> >>>> Thanks
>>> >> >>>> Pankaj Parakh
>>> >> >>>>
>>> >> >>>> _______________________________________________
>>> >> >>>> Xen-devel mailing list
>>> >> >>>> Xen-devel@lists.xensource.com
>>> >> >>>> http://lists.xensource.com/xen-devel
>>> >> >>>>
>>> >> >>>>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Pankaj Parakh
>>> >
>>> >
>>> >
>>> > --
>>> > Pankaj Parakh
>>> >
>>> > _______________________________________________
>>> > Xen-devel mailing list
>>> > Xen-devel@lists.xensource.com
>>> > http://lists.xensource.com/xen-devel
>>> >
>>> >
>>
>>
>>
>> --
>> Pankaj Parakh
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>>
>
--
Pankaj Parakh
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
2009-11-10 6:48 ` Pankaj Parakh
@ 2009-11-10 7:05 ` Pankaj Parakh
[not found] ` <27a8ee1b0911110337k34a03b7di7b7f71ab2e36ffa1@mail.gmail.com>
0 siblings, 1 reply; 17+ messages in thread
From: Pankaj Parakh @ 2009-11-10 7:05 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel@lists.xensource.com
Also is what schedule_lock in schedlue_data is for ??
I tried to use it thinking it'll stop further scheduling, but it hangs
my machine and the function doesnot proceed after that.. is something
else I have to do to pause scheduling in XEN.
On Tue, Nov 10, 2009 at 12:18 PM, Pankaj Parakh
<me.pankajparakh@gmail.com> wrote:
> How to disable softirq in Xen, if I want that no function should be
> able to raise SCHEDULE_SOFTIRQ, how can I do that??
>
> On Thu, Nov 5, 2009 at 3:25 PM, George Dunlap
> <George.Dunlap@eu.citrix.com> wrote:
>> I assume you mean, once you've paused current(), how do you get into
>> the scheduler to actually get it off the cpu?
>>
>> In Linux, you can call schedule() because each process has its own
>> kernel stack allocated to it; the stack "remembers" where each process
>> was in the kernel, so you can return from schedule() at the same place
>> in the kernel once you're scheduled again.
>>
>> Xen only has one stack per cpu, so it cannot keep track of where *in
>> the hypervisor* a vcpu is that gets scheduled out. Therefore, you
>> can't call schedule() directly, as it would throw away the stack. You
>> must raise SCHEDULE_SOFTIRQ on the current cpu, and then return back
>> to the guest. On the way out, the softirq will call schedule() and
>> switch to another vcpu if necessary. (It will only schedule the idle
>> process if there are no runnable vcpus.)
>>
>> grep for SCHEDULE_SOFTIRQ to see examples of how this is used in Xen.
>>
>> -George
>>
>> On Thu, Nov 5, 2009 at 12:43 AM, Pankaj Parakh
>> <me.pankajparakh@gmail.com> wrote:
>>> How can I schedule idle vcpu voluntarily without using schedule() ??
>>> Is there any function for it already defined, or do I have to follow
>>> some steps.. ??
>>>
>>> On Wed, Nov 4, 2009 at 5:09 PM, George Dunlap
>>> <George.Dunlap@eu.citrix.com> wrote:
>>>>
>>>> On Wed, Nov 4, 2009 at 5:59 AM, Pankaj Parakh <me.pankajparakh@gmail.com> wrote:
>>>> > If I take domain_update_lock for a domain, what will happen to its
>>>> > interrupts for IO completions or any other type..??
>>>> > And will it be scheduled if I hold that lock..??
>>>>
>>>> Have you looked at the interrupt delivery / IO completion path, or the
>>>> scheduler path, to see if those are affected by the
>>>> domain_update_lock()?
>>>>
>>>> Xen is a bit of a twisted web; sometimes you just have to follow a web
>>>> of logic around to find out what you're looking for; then, once you've
>>>> come to a conclusion, test it by writing some code.
>>>>
>>>> For the scheduling question, you might start with looking at vcpu_runnable().
>>>>
>>>> Peace,
>>>> -George
>>>>
>>>> >
>>>> > On Wed, Nov 4, 2009 at 11:08 AM, Pankaj Parakh <me.pankajparakh@gmail.com>
>>>> > wrote:
>>>> >>
>>>> >> So is that means there will be no interrupt loss, and also clock in
>>>> >> the paused domain will be in right and expected time.. ??
>>>> >>
>>>> >> On Wed, Nov 4, 2009 at 12:41 AM, George Dunlap
>>>> >> <george.dunlap@eu.citrix.com> wrote:
>>>> >> > If you call vcpu_pause(), it atomically increments a counter in the vcpu
>>>> >> > struct. While that counter is non-zero, the vcpu *will not* be
>>>> >> > scheduled,
>>>> >> > interrupts or no. Interrupts will be delivered when it's scheduled
>>>> >> > again.
>>>> >> >
>>>> >> > -George
>>>> >> >
>>>> >> > Pankaj Parakh wrote:
>>>> >> >>
>>>> >> >> If I pause a vcpu/domain using those functions, say if a domain's I/O
>>>> >> >> request over then its interrupt will raise and it can restart its
>>>> >> >> scheduling rite..?? How this interrupts are/ can be queued so that
>>>> >> >> when the vcpu is in pause state, it should nat change its state and
>>>> >> >> when it come back to wait state, those interrupt will not be lost..
>>>> >> >>
>>>> >> >> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
>>>> >> >> <George.Dunlap@eu.citrix.com> wrote:
>>>> >> >>
>>>> >> >>>
>>>> >> >>> Do you mean that you want to stop one specific vcpu / domain from
>>>> >> >>> being scheduled?
>>>> >> >>>
>>>> >> >>> If so, you're looking for the following functions:
>>>> >> >>> vcpu_pause(), vcpu_unpause()
>>>> >> >>> domain_pause(), domain_unpause().
>>>> >> >>>
>>>> >> >>> They're defined in xen/common/domain.c.
>>>> >> >>>
>>>> >> >>> -George
>>>> >> >>>
>>>> >> >>>
>>>> >> >>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh
>>>> >> >>> <me.pankajparakh@gmail.com>
>>>> >> >>> wrote:
>>>> >> >>>
>>>> >> >>>>
>>>> >> >>>> Hi All,
>>>> >> >>>>
>>>> >> >>>> I am working on a project wherein I wanted to stop the scheduling
>>>> >> >>>> activity in hypervisor through 'generic' part of scheduler, I have
>>>> >> >>>> lil
>>>> >> >>>> confusion as to what all things I need to mask/stop for disabling
>>>> >> >>>> hypervisor to schedule any vcpu untill I want.
>>>> >> >>>>
>>>> >> >>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
>>>> >> >>>> to tackle them... I dont know..
>>>> >> >>>>
>>>> >> >>>> I wanted to know what all responsibility the generic scheduler holds
>>>> >> >>>> in hypervisor,
>>>> >> >>>>
>>>> >> >>>> Any type of info or pointer can be useful.
>>>> >> >>>>
>>>> >> >>>> Thanks
>>>> >> >>>> Pankaj Parakh
>>>> >> >>>>
>>>> >> >>>> _______________________________________________
>>>> >> >>>> Xen-devel mailing list
>>>> >> >>>> Xen-devel@lists.xensource.com
>>>> >> >>>> http://lists.xensource.com/xen-devel
>>>> >> >>>>
>>>> >> >>>>
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >
>>>> >> >
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Pankaj Parakh
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Pankaj Parakh
>>>> >
>>>> > _______________________________________________
>>>> > Xen-devel mailing list
>>>> > Xen-devel@lists.xensource.com
>>>> > http://lists.xensource.com/xen-devel
>>>> >
>>>> >
>>>
>>>
>>>
>>> --
>>> Pankaj Parakh
>>>
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@lists.xensource.com
>>> http://lists.xensource.com/xen-devel
>>>
>>
>
>
>
> --
> Pankaj Parakh
>
--
Pankaj Parakh
^ permalink raw reply [flat|nested] 17+ messages in thread
* Fwd: How to Stop scheduler
[not found] ` <27a8ee1b0911110337k34a03b7di7b7f71ab2e36ffa1@mail.gmail.com>
@ 2009-11-11 11:38 ` Pankaj Parakh
2009-11-11 11:48 ` George Dunlap
1 sibling, 0 replies; 17+ messages in thread
From: Pankaj Parakh @ 2009-11-11 11:38 UTC (permalink / raw)
To: xen-devel
Any answers plzz??
Also is what schedule_lock in schedlue_data is for ??
I tried to use it thinking it'll stop further scheduling, but it hangs
my machine and the function doesnot proceed after that.. is something
else I have to do to pause scheduling in XEN.
> On Tue, Nov 10, 2009 at 12:18 PM, Pankaj Parakh
> <me.pankajparakh@gmail.com> wrote:
How to disable softirq in Xen, if I want that no function should be
able to raise SCHEDULE_SOFTIRQ, how can I do that??
> On Thu, Nov 5, 2009 at 3:25 PM, George Dunlap
> <George.Dunlap@eu.citrix.com> wrote:
>> I assume you mean, once you've paused current(), how do you get into
> >> the scheduler to actually get it off the cpu?
> >>
> >> In Linux, you can call schedule() because each process has its own
> >> kernel stack allocated to it; the stack "remembers" where each process
> >> was in the kernel, so you can return from schedule() at the same place
> >> in the kernel once you're scheduled again.
> >>
> >> Xen only has one stack per cpu, so it cannot keep track of where *in
> >> the hypervisor* a vcpu is that gets scheduled out. Therefore, you
> >> can't call schedule() directly, as it would throw away the stack. You
> >> must raise SCHEDULE_SOFTIRQ on the current cpu, and then return back
> >> to the guest. On the way out, the softirq will call schedule() and
> >> switch to another vcpu if necessary. (It will only schedule the idle
> >> process if there are no runnable vcpus.)
> >>
> >> grep for SCHEDULE_SOFTIRQ to see examples of how this is used in Xen.
> >>
> >> -George
> >>
> >> On Thu, Nov 5, 2009 at 12:43 AM, Pankaj Parakh
> >> <me.pankajparakh@gmail.com> wrote:
> >>> How can I schedule idle vcpu voluntarily without using schedule() ??
> >>> Is there any function for it already defined, or do I have to follow
> >>> some steps.. ??
> >>>
> >>> On Wed, Nov 4, 2009 at 5:09 PM, George Dunlap
> >>> <George.Dunlap@eu.citrix.com> wrote:
> >>>>
> >>>> On Wed, Nov 4, 2009 at 5:59 AM, Pankaj Parakh <me.pankajparakh@gmail.com> wrote:
> >>>> > If I take domain_update_lock for a domain, what will happen to its
> >>>> > interrupts for IO completions or any other type..??
> >>>> > And will it be scheduled if I hold that lock..??
> >>>>
> >>>> Have you looked at the interrupt delivery / IO completion path, or the
> >>>> scheduler path, to see if those are affected by the
> >>>> domain_update_lock()?
> >>>>
> >>>> Xen is a bit of a twisted web; sometimes you just have to follow a web
> >>>> of logic around to find out what you're looking for; then, once you've
> >>>> come to a conclusion, test it by writing some code.
> >>>>
> >>>> For the scheduling question, you might start with looking at vcpu_runnable().
> >>>>
> >>>> Peace,
> >>>> -George
> >>>>
> >>>> >
> >>>> > On Wed, Nov 4, 2009 at 11:08 AM, Pankaj Parakh <me.pankajparakh@gmail.com>
> >>>> > wrote:
> >>>> >>
> >>>> >> So is that means there will be no interrupt loss, and also clock in
> >>>> >> the paused domain will be in right and expected time.. ??
> >>>> >>
> >>>> >> On Wed, Nov 4, 2009 at 12:41 AM, George Dunlap
> >>>> >> <george.dunlap@eu.citrix.com> wrote:
> >>>> >> > If you call vcpu_pause(), it atomically increments a counter in the vcpu
> >>>> >> > struct. While that counter is non-zero, the vcpu *will not* be
> >>>> >> > scheduled,
> >>>> >> > interrupts or no. Interrupts will be delivered when it's scheduled
> >>>> >> > again.
> >>>> >> >
> >>>> >> > -George
> >>>> >> >
> >>>> >> > Pankaj Parakh wrote:
> >>>> >> >>
> >>>> >> >> If I pause a vcpu/domain using those functions, say if a domain's I/O
> >>>> >> >> request over then its interrupt will raise and it can restart its
> >>>> >> >> scheduling rite..?? How this interrupts are/ can be queued so that
> >>>> >> >> when the vcpu is in pause state, it should nat change its state and
> >>>> >> >> when it come back to wait state, those interrupt will not be lost..
> >>>> >> >>
> >>>> >> >> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
> >>>> >> >> <George.Dunlap@eu.citrix.com> wrote:
> >>>> >> >>
> >>>> >> >>>
> >>>> >> >>> Do you mean that you want to stop one specific vcpu / domain from
> >>>> >> >>> being scheduled?
> >>>> >> >>>
> >>>> >> >>> If so, you're looking for the following functions:
> >>>> >> >>> vcpu_pause(), vcpu_unpause()
> >>>> >> >>> domain_pause(), domain_unpause().
> >>>> >> >>>
> >>>> >> >>> They're defined in xen/common/domain.c.
> >>>> >> >>>
> >>>> >> >>> -George
> >>>> >> >>>
> >>>> >> >>>
> >>>> >> >>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh
> >>>> >> >>> <me.pankajparakh@gmail.com>
> >>>> >> >>> wrote:
> >>>> >> >>>
> >>>> >> >>>>
> >>>> >> >>>> Hi All,
> >>>> >> >>>>
> >>>> >> >>>> I am working on a project wherein I wanted to stop the scheduling
> >>>> >> >>>> activity in hypervisor through 'generic' part of scheduler, I have
> >>>> >> >>>> lil
> >>>> >> >>>> confusion as to what all things I need to mask/stop for disabling
> >>>> >> >>>> hypervisor to schedule any vcpu untill I want.
> >>>> >> >>>>
> >>>> >> >>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
> >>>> >> >>>> to tackle them... I dont know..
> >>>> >> >>>>
> >>>> >> >>>> I wanted to know what all responsibility the generic scheduler holds
> >>>> >> >>>> in hypervisor,
> >>>> >> >>>>
> >>>> >> >>>> Any type of info or pointer can be useful.
> >>>> >> >>>>
> >>>> >> >>>> Thanks
> >>>> >> >>>> Pankaj Parakh
> >>>> >> >>>>
> >>>> >> >>>> _______________________________________________
> >>>> >> >>>> Xen-devel mailing list
> >>>> >> >>>> Xen-devel@lists.xensource.com
> >>>> >> >>>> http://lists.xensource.com/xen-devel
> >>>> >> >>>>
> >>>> >> >>>>
> >>>> >> >>
> >>>> >> >>
> >>>> >> >>
> >>>> >> >>
> >>>> >> >
> >>>> >> >
> >>>> >>
> >>>> >>
> >>>> >>
> >>>> >> --
> >>>> >> Pankaj Parakh
> >>>> >
> >>>> >
> >>>> >
> >>>> > --
> >>>> > Pankaj Parakh
> >>>> >
> >>>> > _______________________________________________
> >>>> > Xen-devel mailing list
> >>>> > Xen-devel@lists.xensource.com
> >>>> > http://lists.xensource.com/xen-devel
> >>>> >
> >>>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Pankaj Parakh
> >>>
> >>> _______________________________________________
> >>> Xen-devel mailing list
> >>> Xen-devel@lists.xensource.com
> >>> http://lists.xensource.com/xen-devel
> >>>
> >>
> >
> >
> >
> > --
> > Pankaj Parakh
> >
>
>
>
> --
> Pankaj Parakh
--
Pankaj Parakh
--
Pankaj Parakh
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: How to Stop scheduler
[not found] ` <27a8ee1b0911110337k34a03b7di7b7f71ab2e36ffa1@mail.gmail.com>
2009-11-11 11:38 ` Fwd: " Pankaj Parakh
@ 2009-11-11 11:48 ` George Dunlap
1 sibling, 0 replies; 17+ messages in thread
From: George Dunlap @ 2009-11-11 11:48 UTC (permalink / raw)
To: Pankaj Parakh, xen-devel@lists.xensource.com
The purpose of schedule_lock in schedule_data is to prevent race
conditions when accessing schedule_data.
A prerequisite for being able to do any work in Xen is knowing:
* What a race condition is
* How spinlocks work
* How to use spinlocks (and other synchronization techniques) to avoid
data races
* How to avoid introducing deadlock conditions when using spinlocks
Your question makes it seem like you're not familiar with the above
concepts. I suggest you spend some time learning about them first, and
then come back to your work with Xen. It's especially important that
you have worked through several examples to develop an "instinct" for
what kinds of things might be data races and what might cause deadlock.
Data races and deadlock are both incredibly difficult to debug, and the
scheduler is particularly prone to both.
-George
Pankaj Parakh wrote:
> Any answers plzz??
>
>
> Also is what schedule_lock in schedlue_data is for ??
> I tried to use it thinking it'll stop further scheduling, but it hangs
> my machine and the function doesnot proceed after that.. is something
> else I have to do to pause scheduling in XEN.
>
>
>> On Tue, Nov 10, 2009 at 12:18 PM, Pankaj Parakh
>> <me.pankajparakh@gmail.com> wrote:
>>
> How to disable softirq in Xen, if I want that no function should be
> able to raise SCHEDULE_SOFTIRQ, how can I do that??
>
>
> > On Thu, Nov 5, 2009 at 3:25 PM, George Dunlap
> > <George.Dunlap@eu.citrix.com> wrote:
> >> I assume you mean, once you've paused current(), how do you get into
>
>>>> the scheduler to actually get it off the cpu?
>>>>
>>>> In Linux, you can call schedule() because each process has its own
>>>> kernel stack allocated to it; the stack "remembers" where each process
>>>> was in the kernel, so you can return from schedule() at the same place
>>>> in the kernel once you're scheduled again.
>>>>
>>>> Xen only has one stack per cpu, so it cannot keep track of where *in
>>>> the hypervisor* a vcpu is that gets scheduled out. Therefore, you
>>>> can't call schedule() directly, as it would throw away the stack. You
>>>> must raise SCHEDULE_SOFTIRQ on the current cpu, and then return back
>>>> to the guest. On the way out, the softirq will call schedule() and
>>>> switch to another vcpu if necessary. (It will only schedule the idle
>>>> process if there are no runnable vcpus.)
>>>>
>>>> grep for SCHEDULE_SOFTIRQ to see examples of how this is used in Xen.
>>>>
>>>> -George
>>>>
>>>> On Thu, Nov 5, 2009 at 12:43 AM, Pankaj Parakh
>>>> <me.pankajparakh@gmail.com> wrote:
>>>>
>>>>> How can I schedule idle vcpu voluntarily without using schedule() ??
>>>>> Is there any function for it already defined, or do I have to follow
>>>>> some steps.. ??
>>>>>
>>>>> On Wed, Nov 4, 2009 at 5:09 PM, George Dunlap
>>>>> <George.Dunlap@eu.citrix.com> wrote:
>>>>>
>>>>>> On Wed, Nov 4, 2009 at 5:59 AM, Pankaj Parakh <me.pankajparakh@gmail.com> wrote:
>>>>>>
>>>>>>> If I take domain_update_lock for a domain, what will happen to its
>>>>>>> interrupts for IO completions or any other type..??
>>>>>>> And will it be scheduled if I hold that lock..??
>>>>>>>
>>>>>> Have you looked at the interrupt delivery / IO completion path, or the
>>>>>> scheduler path, to see if those are affected by the
>>>>>> domain_update_lock()?
>>>>>>
>>>>>> Xen is a bit of a twisted web; sometimes you just have to follow a web
>>>>>> of logic around to find out what you're looking for; then, once you've
>>>>>> come to a conclusion, test it by writing some code.
>>>>>>
>>>>>> For the scheduling question, you might start with looking at vcpu_runnable().
>>>>>>
>>>>>> Peace,
>>>>>> -George
>>>>>>
>>>>>>
>>>>>>> On Wed, Nov 4, 2009 at 11:08 AM, Pankaj Parakh <me.pankajparakh@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> So is that means there will be no interrupt loss, and also clock in
>>>>>>>> the paused domain will be in right and expected time.. ??
>>>>>>>>
>>>>>>>> On Wed, Nov 4, 2009 at 12:41 AM, George Dunlap
>>>>>>>> <george.dunlap@eu.citrix.com> wrote:
>>>>>>>>
>>>>>>>>> If you call vcpu_pause(), it atomically increments a counter in the vcpu
>>>>>>>>> struct. While that counter is non-zero, the vcpu *will not* be
>>>>>>>>> scheduled,
>>>>>>>>> interrupts or no. Interrupts will be delivered when it's scheduled
>>>>>>>>> again.
>>>>>>>>>
>>>>>>>>> -George
>>>>>>>>>
>>>>>>>>> Pankaj Parakh wrote:
>>>>>>>>>
>>>>>>>>>> If I pause a vcpu/domain using those functions, say if a domain's I/O
>>>>>>>>>> request over then its interrupt will raise and it can restart its
>>>>>>>>>> scheduling rite..?? How this interrupts are/ can be queued so that
>>>>>>>>>> when the vcpu is in pause state, it should nat change its state and
>>>>>>>>>> when it come back to wait state, those interrupt will not be lost..
>>>>>>>>>>
>>>>>>>>>> On Tue, Nov 3, 2009 at 5:18 PM, George Dunlap
>>>>>>>>>> <George.Dunlap@eu.citrix.com> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Do you mean that you want to stop one specific vcpu / domain from
>>>>>>>>>>> being scheduled?
>>>>>>>>>>>
>>>>>>>>>>> If so, you're looking for the following functions:
>>>>>>>>>>> vcpu_pause(), vcpu_unpause()
>>>>>>>>>>> domain_pause(), domain_unpause().
>>>>>>>>>>>
>>>>>>>>>>> They're defined in xen/common/domain.c.
>>>>>>>>>>>
>>>>>>>>>>> -George
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Nov 2, 2009 at 9:02 PM, Pankaj Parakh
>>>>>>>>>>> <me.pankajparakh@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Hi All,
>>>>>>>>>>>>
>>>>>>>>>>>> I am working on a project wherein I wanted to stop the scheduling
>>>>>>>>>>>> activity in hypervisor through 'generic' part of scheduler, I have
>>>>>>>>>>>> lil
>>>>>>>>>>>> confusion as to what all things I need to mask/stop for disabling
>>>>>>>>>>>> hypervisor to schedule any vcpu untill I want.
>>>>>>>>>>>>
>>>>>>>>>>>> Issues which I can think are about I/O waits or Zombie VCPUs. But how
>>>>>>>>>>>> to tackle them... I dont know..
>>>>>>>>>>>>
>>>>>>>>>>>> I wanted to know what all responsibility the generic scheduler holds
>>>>>>>>>>>> in hypervisor,
>>>>>>>>>>>>
>>>>>>>>>>>> Any type of info or pointer can be useful.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks
>>>>>>>>>>>> Pankaj Parakh
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Xen-devel mailing list
>>>>>>>>>>>> Xen-devel@lists.xensource.com
>>>>>>>>>>>> http://lists.xensource.com/xen-devel
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Pankaj Parakh
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Pankaj Parakh
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Xen-devel mailing list
>>>>>>> Xen-devel@lists.xensource.com
>>>>>>> http://lists.xensource.com/xen-devel
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>> --
>>>>> Pankaj Parakh
>>>>>
>>>>> _______________________________________________
>>>>> Xen-devel mailing list
>>>>> Xen-devel@lists.xensource.com
>>>>> http://lists.xensource.com/xen-devel
>>>>>
>>>>>
>>>
>>> --
>>> Pankaj Parakh
>>>
>>>
>>
>> --
>> Pankaj Parakh
>>
>
>
>
> --
> Pankaj Parakh
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2009-11-11 11:48 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 21:02 How to Stop scheduler Pankaj Parakh
2009-11-03 11:48 ` George Dunlap
2009-11-03 11:58 ` George Dunlap
2009-11-03 19:02 ` Pankaj Parakh
2009-11-03 19:11 ` George Dunlap
2009-11-04 5:38 ` Pankaj Parakh
2009-11-04 5:59 ` Pankaj Parakh
2009-11-04 11:39 ` George Dunlap
2009-11-05 0:43 ` Pankaj Parakh
2009-11-05 9:55 ` George Dunlap
2009-11-05 10:27 ` George Dunlap
2009-11-05 18:06 ` Pankaj Parakh
2009-11-10 6:48 ` Pankaj Parakh
2009-11-10 7:05 ` Pankaj Parakh
[not found] ` <27a8ee1b0911110337k34a03b7di7b7f71ab2e36ffa1@mail.gmail.com>
2009-11-11 11:38 ` Fwd: " Pankaj Parakh
2009-11-11 11:48 ` George Dunlap
2009-11-04 6:02 ` James (song wei)
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.