Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300117
b: refs/heads/master
c: 62c49cc
h: refs/heads/master
i:
  300115: 547607b
v: v3
  • Loading branch information
Gleb Natapov authored and Avi Kivity committed May 6, 2012
1 parent 7360830 commit d28bca3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a4fa16353108431e7cfdfc3ecf683bac21b50755
refs/heads/master: 62c49cc976af84cb0ffcb5ec07ee88da1a94e222
9 changes: 1 addition & 8 deletions trunk/arch/x86/kernel/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ struct kvm_task_sleep_node {
u32 token;
int cpu;
bool halted;
struct mm_struct *mm;
};

static struct kvm_task_sleep_head {
Expand Down Expand Up @@ -126,9 +125,7 @@ void kvm_async_pf_task_wait(u32 token)

n.token = token;
n.cpu = smp_processor_id();
n.mm = current->active_mm;
n.halted = idle || preempt_count() > 1;
atomic_inc(&n.mm->mm_count);
init_waitqueue_head(&n.wq);
hlist_add_head(&n.link, &b->list);
spin_unlock(&b->lock);
Expand Down Expand Up @@ -161,9 +158,6 @@ EXPORT_SYMBOL_GPL(kvm_async_pf_task_wait);
static void apf_task_wake_one(struct kvm_task_sleep_node *n)
{
hlist_del_init(&n->link);
if (!n->mm)
return;
mmdrop(n->mm);
if (n->halted)
smp_send_reschedule(n->cpu);
else if (waitqueue_active(&n->wq))
Expand Down Expand Up @@ -207,7 +201,7 @@ void kvm_async_pf_task_wake(u32 token)
* async PF was not yet handled.
* Add dummy entry for the token.
*/
n = kmalloc(sizeof(*n), GFP_ATOMIC);
n = kzalloc(sizeof(*n), GFP_ATOMIC);
if (!n) {
/*
* Allocation failed! Busy wait while other cpu
Expand All @@ -219,7 +213,6 @@ void kvm_async_pf_task_wake(u32 token)
}
n->token = token;
n->cpu = smp_processor_id();
n->mm = NULL;
init_waitqueue_head(&n->wq);
hlist_add_head(&n->link, &b->list);
} else
Expand Down

0 comments on commit d28bca3

Please sign in to comment.