thread synchronization in qcow2.c and qcow2-cluster.c

Submitted by Stefan Hajnoczi on April 27, 2010, 9:26 p.m.

Details

Message ID u2ifbd9d3991004271426v356d5ff7u46e16325dfa722d8@mail.gmail.com
State New
Headers show

Commit Message

Stefan Hajnoczi April 27, 2010, 9:26 p.m.
On Tue, Apr 27, 2010 at 9:39 PM, Chunqiang (CQ) Tang <tangchq@gmail.com> wrote:
> Thank you for the information. I also suspected that
> qemu_mutex_lock_iothread() does the synchronization. However, my
> profiling showed that qemu-kvm.c:kvm_cpu_exec() in is actually
> executed, instead of kvm-all.c:kvm_cpu_exec().

Are you using qemu-kvm.git?

Can you double check that qemu-kvm.o is being linked in instead of kvm-all.o?

I looked at the link map for qemu-system-x86_64 and verified that
kvm-all.o is linked in and qemu-kvm.o is not linked in.

Stefan

Comments

Stefan Hajnoczi April 28, 2010, 8:13 a.m.
On Tue, Apr 27, 2010 at 10:26 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> Can you double check that qemu-kvm.o is being linked in instead of kvm-all.o?

I looked again and noticed that qemu-kvm.c is included from kvm-all.c.
 Please ignore my question of whether qemu-kvm.c is being linked in
:).

Perhaps you'd like to post your latest findings to the KVM mailing
list at kvm@vger.kernel.org since this is a qemu-kvm question?

Stefan
Chunqiang (CQ) Tang April 28, 2010, 2:59 p.m.
On Wed, Apr 28, 2010 at 4:13 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> On Tue, Apr 27, 2010 at 10:26 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>> Can you double check that qemu-kvm.o is being linked in instead of kvm-all.o?
>
> I looked again and noticed that qemu-kvm.c is included from kvm-all.c.
>  Please ignore my question of whether qemu-kvm.c is being linked in
> :).
>
> Perhaps you'd like to post your latest findings to the KVM mailing
> list at kvm@vger.kernel.org since this is a qemu-kvm question?
>
> Stefan

Yes, this is a qemu-kvm question. I will summarize my finding and send
it to kvm@vger.kernel.org . Thank you for the answers and for
informing the KVM mailing list.

Regards,
CQ Tang

Patch hide | download patch | download mbox

diff --git a/Makefile.target b/Makefile.target
index 1ffd802..122b951 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -30,6 +30,7 @@  endif

 PROGS=$(QEMU_PROG)

+LDFLAGS+=-Wl,-Map=$(QEMU_PROG).map
 LIBS+=-lm

 kvm.o kvm-all.o: QEMU_CFLAGS+=$(KVM_CFLAGS)