From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "Zhangbo (Oscar)" <oscar.zhangbo@huawei.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: "Hanweidong (Randy)" <hanweidong@huawei.com>,
Yanqiangjun <yanqiangjun@huawei.com>,
"Huangpeng (Peter)" <peter.huangpeng@huawei.com>,
"Wangyufei (James)" <james.wangyufei@huawei.com>,
Huangzhichao <huangzhichao@huawei.com>,
"Herongguang (Stephen)" <herongguang.he@huawei.com>,
"dengkai (A)" <dengkai1@huawei.com>
Subject: Re: what's the equivalent function to "schedule_timeout" in xen kernel?
Date: Mon, 16 Nov 2015 09:56:37 +0000 [thread overview]
Message-ID: <5649A855.5090505@citrix.com> (raw)
In-Reply-To: <0259E1C966E8C54AA93AA2B1240828E650F2EE42@szxema507-mbs.china.huawei.com>
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.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-11-16 9:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 6:36 what's the equivalent function to "schedule_timeout" in xen kernel? Zhangbo (Oscar)
2015-11-16 9:56 ` Andrew Cooper [this message]
2015-11-16 11:18 ` George Dunlap
2015-11-16 12:35 ` Olaf Hering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5649A855.5090505@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=dengkai1@huawei.com \
--cc=hanweidong@huawei.com \
--cc=herongguang.he@huawei.com \
--cc=huangzhichao@huawei.com \
--cc=james.wangyufei@huawei.com \
--cc=oscar.zhangbo@huawei.com \
--cc=peter.huangpeng@huawei.com \
--cc=xen-devel@lists.xen.org \
--cc=yanqiangjun@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.