xen/24231-waitqueue_Implement_wake_up_nroneall..patch
Charles Arnold c9e3853c04 - bnc#735806 - VF doesn't work after hot-plug for many times
24448-x86-pt-irq-leak.patch
- Upstream patches from Jan
  24261-x86-cpuidle-Westmere-EX.patch
  24417-amd-erratum-573.patch
  24429-mceinj-tool.patch
  24447-x86-TXT-INIT-SIPI-delay.patch
  ioemu-9868-MSI-X.patch 

- bnc#732884 - remove private runlevel 4 from init scripts
  xen.no-default-runlevel-4.patch

- bnc#727515 - Fragmented packets hang network boot of HVM guest 
  ipxe-gcc45-warnings.patch
  ipxe-ipv4-fragment.patch
  ipxe-enable-nics.patch

- fate#310510 - fix xenpaging
  update xenpaging.autostart.patch, make changes with mem-swap-target 
  permanent
  update xenpaging.doc.patch, mention issues with live migration

- fate#310510 - fix xenpaging
  add xenpaging.evict_mmap_readonly.patch
  update xenpaging.error-handling.patch, reduce debug output

- bnc#736824 - Microcode patches for AMD's 15h processors panic the 
  system
  24189-x86-p2m-pod-locking.patch
  24412-x86-AMD-errata-model-shift.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=164
2012-01-05 19:41:54 +00:00

70 lines
2.1 KiB
Diff

changeset: 24231:2a81ce2b2b93
user: Keir Fraser <keir@xen.org>
date: Fri Nov 25 20:27:11 2011 +0000
files: xen/common/wait.c xen/include/xen/wait.h
description:
waitqueue: Implement wake_up_{nr,one,all}.
Signed-off-by: Keir Fraser <keir@xen.org>
---
xen/common/wait.c | 14 ++++++++++++--
xen/include/xen/wait.h | 6 ++++--
2 files changed, 16 insertions(+), 4 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
@@ -87,13 +87,13 @@ void init_waitqueue_head(struct waitqueu
INIT_LIST_HEAD(&wq->list);
}
-void wake_up(struct waitqueue_head *wq)
+void wake_up_nr(struct waitqueue_head *wq, unsigned int nr)
{
struct waitqueue_vcpu *wqv;
spin_lock(&wq->lock);
- while ( !list_empty(&wq->list) )
+ while ( !list_empty(&wq->list) && nr-- )
{
wqv = list_entry(wq->list.next, struct waitqueue_vcpu, list);
list_del_init(&wqv->list);
@@ -103,6 +103,16 @@ void wake_up(struct waitqueue_head *wq)
spin_unlock(&wq->lock);
}
+void wake_up_one(struct waitqueue_head *wq)
+{
+ wake_up_nr(wq, 1);
+}
+
+void wake_up_all(struct waitqueue_head *wq)
+{
+ wake_up_nr(wq, UINT_MAX);
+}
+
#ifdef CONFIG_X86
static void __prepare_to_wait(struct waitqueue_vcpu *wqv)
Index: xen-4.1.2-testing/xen/include/xen/wait.h
===================================================================
--- xen-4.1.2-testing.orig/xen/include/xen/wait.h
+++ xen-4.1.2-testing/xen/include/xen/wait.h
@@ -28,8 +28,10 @@ struct waitqueue_head {
/* Dynamically initialise a waitqueue. */
void init_waitqueue_head(struct waitqueue_head *wq);
-/* Wake all VCPUs waiting on specified waitqueue. */
-void wake_up(struct waitqueue_head *wq);
+/* Wake VCPU(s) waiting on specified waitqueue. */
+void wake_up_nr(struct waitqueue_head *wq, unsigned int nr);
+void wake_up_one(struct waitqueue_head *wq);
+void wake_up_all(struct waitqueue_head *wq);
/* Wait on specified waitqueue until @condition is true. */
#define wait_event(wq, condition) \