From: Olaf Hering <olaf@aepfle.de>
To: "Zhangbo (Oscar)" <oscar.zhangbo@huawei.com>
Cc: "Hanweidong (Randy)" <hanweidong@huawei.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Yanqiangjun <yanqiangjun@huawei.com>,
"Huangpeng (Peter)" <peter.huangpeng@huawei.com>,
xen-devel@lists.xen.org,
"Herongguang (Stephen)" <herongguang.he@huawei.com>,
Huangzhichao <huangzhichao@huawei.com>,
"Wangyufei (James)" <james.wangyufei@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 13:35:11 +0100 [thread overview]
Message-ID: <20151116123511.GA7906@aepfle.de> (raw)
In-Reply-To: <5649A855.5090505@citrix.com>
On Mon, Nov 16, Andrew Cooper 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.
For xenpaging xen/common/wait.c was invented, which gives some sort of
async. The thread of execution goes to sleep, until another thread wakes
it up again.
Olaf
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2015-11-16 12:35 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
2015-11-16 11:18 ` George Dunlap
2015-11-16 12:35 ` Olaf Hering [this message]
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=20151116123511.GA7906@aepfle.de \
--to=olaf@aepfle.de \
--cc=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.