[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] what's the equivalent function to "schedule_timeout" in xen kernel?

On Mon, Nov 16, 2015 at 9:56 AM, Andrew Cooper
<andrew.cooper3@xxxxxxxxxx> wrote:
> On 16/11/15 06:36, Zhangbo (Oscar) wrote:
>> Hi all:
>>ãã I'd like to SLEEP a while in xen kernel during VMEXIT,  the easiest way is 
>>to call "udelay" or "mdelay" there. However, these 2 functions use busy wait 
>>to sleep, which is a waste.
>>ãã In linux kernel, there's a function named  'schedule_timeout', allowing 
>>the CPU to run other tasks during SLEEPING.
>>ãã So, is there any equivalent function to "schedule_timeout" in xen kernel ?
>>ãã Thanks in advance.
> There is not any equivalent.  Paths through Xen are synchronous
> (scheduling vCPUS has different requirements/constraints than scheduling
> userspace tasks), and there are no concepts of tasks like the Linux
> kernel has.
> Your only option is to busy wait, but there is probably a different way
> of achieving what you are attempting to do.

...which implies the question:  What is it that you're trying to do?
Why do you want to delay during a vmexit?


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.