Re: [PATCH] qemu-kvm: Consolidate kvm_eat_signals

Jan Kiszka
2008-05-12T11:42:11Z

[-- Attachment #1.1: Type: text/plain, Size: 893 bytes --]

Avi Kivity wrote:
> Jan Kiszka wrote:
>> Having both kvm_eat_signal and kvm_eat_signals makes the code harder to
>> read. Moreover, given the single caller of kvm_eat_signals, there is no
>> real reason to keep it in a separate function.
>>
>>
>
> Given that with the iothread we spend very little time processing
> signals in vcpu threads, maybe it's better to drop the loop completely.
> The common case is zero or one pending signals. The uncommon case of
> two or more pending signals will be handled by the KVM_RUN ioctl
> returning immediately with -EINTR (i.e. in the outer loop).
>

You mean

static void kvm_main_loop_wait(CPUState *env, int timeout)
{
pthread_mutex_unlock(&qemu_mutex);
kvm_eat_signal(env, timeout);
pthread_mutex_lock(&qemu_mutex);
cpu_single_env = env;

vcpu_info[env->cpu_index].signalled = 0;
}

?

Jan

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

[-- Attachment #2: Type: text/plain, Size: 320 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net