qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] qemu-kvm: response to SIGUSR1 to start/stop a V


From: Avi Kivity
Subject: [Qemu-devel] Re: [PATCH] qemu-kvm: response to SIGUSR1 to start/stop a VCPU (v2)
Date: Thu, 02 Dec 2010 11:17:52 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.6

On 12/01/2010 09:09 PM, Peter Zijlstra wrote:
>
>  We are dealing with just one task here (the task that is yielding).
>  After recording how much timeslice we are "giving up" in current->donate_time
>  (donate_time is perhaps not the right name to use), we adjust the yielding
>  task's vruntime as per existing logic (for ex: to make it go to back of
>  runqueue). When the yielding tasks gets to run again, lock is hopefully
>  available for it to grab, we let it run longer than the default sched_slice()
>  to compensate for what time it gave up previously to other threads in same
>  runqueue. This ensures that because of yielding upon lock contention, we are 
not
>  leaking bandwidth in favor of other guests. Again I don't know how much of
>  fairness issue this is in practice, so unless we see some numbers I'd prefer
>  sticking to plain yield() upon lock-contention (for unmodified guests that 
is).

No, that won't work. Once you've given up time you cannot add it back
without destroying fairness.

You can limit the unfairness by limiting the amount of feedback, but I
really dislike such 'yield' semantics.

Agreed.

What I'd like to see in directed yield is donating exactly the amount of vruntime that's needed to make the target thread run. The donating thread won't get its vruntime back, unless the other thread hits contention itself and does a directed yield back. So even if your lock is ping-ponged around, the guest doesn't lose vruntime compared to other processes on the host.

--
error compiling committee.c: too many arguments to function




reply via email to

[Prev in Thread] Current Thread [Next in Thread]