Skip to content

Commit

Permalink
kvm: skip system call when msi route is unchanged
Browse files Browse the repository at this point in the history
Some guests do a large number of mask/unmask
calls which currently trigger expensive route update
system calls.
Detect that route in unchanged and skip the system call.

Reported-by: "Zhanghaoyu (A)" <haoyu.zhang@huawei.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
  • Loading branch information
mstsirkin authored and bonzini committed Jul 3, 2013
1 parent 0fbc207 commit 40509f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kvm-all.c
Expand Up @@ -1034,6 +1034,10 @@ static int kvm_update_routing_entry(KVMState *s,
continue;
}

if(!memcmp(entry, new_entry, sizeof *entry)) {
return 0;
}

*entry = *new_entry;

kvm_irqchip_commit_routes(s);
Expand Down

0 comments on commit 40509f7

Please sign in to comment.