Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
xen
24196-waitqueue_Reorder_prepare_to_wait_so_that...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 24196-waitqueue_Reorder_prepare_to_wait_so_that_vcpu_is_definitely_on_the.patch of Package xen
changeset: 24196:de4fe05fe887 user: Keir Fraser <keir@xen.org> date: Thu Nov 24 15:49:25 2011 +0000 files: xen/common/wait.c description: waitqueue: Reorder prepare_to_wait() so that vcpu is definitely on the queue on exit, even after a wakeup. Otherwise, when we go round the loop in wait_event(), we may not actually sleep after the first iteration, as we do not put ourselves back on the queue on wakeup. Signed-off-by: Keir Fraser <keir@xen.org> --- xen/common/wait.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) Index: xen-4.1.2-testing/xen/common/wait.c =================================================================== --- xen-4.1.2-testing.orig/xen/common/wait.c +++ xen-4.1.2-testing/xen/common/wait.c @@ -107,6 +107,8 @@ static void __prepare_to_wait(struct wai { char *cpu_info = (char *)get_cpu_info(); + ASSERT(wqv->esp == 0); + asm volatile ( #ifdef CONFIG_X86_64 "push %%rax; push %%rbx; push %%rcx; push %%rdx; push %%rdi; " @@ -173,14 +175,13 @@ void prepare_to_wait(struct waitqueue_he struct waitqueue_vcpu *wqv = curr->waitqueue_vcpu; ASSERT(!in_atomic()); - ASSERT(list_empty(&wqv->list)); + __prepare_to_wait(wqv); + ASSERT(list_empty(&wqv->list)); spin_lock(&wq->lock); list_add_tail(&wqv->list, &wq->list); vcpu_pause_nosync(curr); spin_unlock(&wq->lock); - - __prepare_to_wait(wqv); } void finish_wait(struct waitqueue_head *wq)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor