All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: mlin@kernel.org, famz@redhat.com, ming.lei@canonical.com,
	stefanha@redhat.com, mst@redhat.com
Subject: Re: [Qemu-devel] [RFC PATCH 00/40] Sneak peek of virtio and dataplane changes for 2.6
Date: Wed, 16 Dec 2015 13:54:06 +0100	[thread overview]
Message-ID: <56715EEE.6020208@de.ibm.com> (raw)
In-Reply-To: <5668907A.80604@redhat.com>

On 12/09/2015 09:35 PM, Paolo Bonzini wrote:
> 
> 
> On 26/11/2015 11:39, Paolo Bonzini wrote:
>> I would really prefer to get rid of vring.c as soon as the infrastructure
>> makes it possible---even if it's faster. We know what makes virtio.c
>> slower, and it's simpler to fix virtio.c than to convert all the other
>> models to vring.c _plus_ make vring.c safe for migration.
> 
> I've now pushed some optimizations of exec.c to the same place (branch
> dataplane, git://github.com/bonzini/qemu.git).  Basically if the length
> of an address_space_read is constant, and the target ends up being RAM,
> the compiler can inline address_space_read in the caller and in
> particular eliminate the memcpy.

Just some quick remarks before I leave into vacation:

Performance seems to be better than the initial version. I have some
hangs from time to time when shutting down (also with your previous
version)

(gdb) thread apply all bt

Thread 10 (Thread 0x3ff95b7f910 (LWP 9700)):
#0  0x000003ff9707cf56 in syscall () from /lib64/libc.so.6
#1  0x0000000010201586 in futex_wait (val=<optimized out>, f=<optimized out>) at /home/cborntra/REPOS/qemu/include/qemu/futex.h:26
#2  qemu_event_wait (ev=ev@entry=0x107f2cb4 <rcu_call_ready_event>) at /home/cborntra/REPOS/qemu/util/qemu-thread-posix.c:398
#3  0x0000000010214fe2 in call_rcu_thread (opaque=<optimized out>) at /home/cborntra/REPOS/qemu/util/rcu.c:254
#4  0x000003ff971884c6 in start_thread () from /lib64/libpthread.so.0
#5  0x000003ff97082ec2 in thread_start () from /lib64/libc.so.6

Thread 9 (Thread 0x3ff9537f910 (LWP 9701)):
#0  0x000003ff9718f5fa in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x000003ff9718a582 in pthread_mutex_lock () from /lib64/libpthread.so.0
#2  0x0000000010201062 in qemu_mutex_lock (mutex=<optimized out>) at /home/cborntra/REPOS/qemu/util/qemu-thread-posix.c:69
#3  0x0000000010184ffa in aio_context_acquire (ctx=<optimized out>) at /home/cborntra/REPOS/qemu/async.c:361
#4  0x0000000010185322 in thread_pool_completion_bh (opaque=0x3ff90000ca0) at /home/cborntra/REPOS/qemu/thread-pool.c:168
#5  0x0000000010184b0c in aio_bh_call (bh=<optimized out>) at /home/cborntra/REPOS/qemu/async.c:64
#6  aio_bh_poll (ctx=ctx@entry=0x480e00d0) at /home/cborntra/REPOS/qemu/async.c:96
#7  0x0000000010191ec2 in aio_poll (ctx=0x480e00d0, blocking=blocking@entry=true) at /home/cborntra/REPOS/qemu/aio-posix.c:464
#8  0x00000000100c4bfe in iothread_run (opaque=0x480dfc00) at /home/cborntra/REPOS/qemu/iothread.c:42
#9  0x000003ff971884c6 in start_thread () from /lib64/libpthread.so.0
#10 0x000003ff97082ec2 in thread_start () from /lib64/libc.so.6

Thread 8 (Thread 0x3ff94b7f910 (LWP 9702)):
#0  0x000003ff970766e6 in ppoll () from /lib64/libc.so.6
#1  0x00000000101908c0 in ppoll (__ss=0x0, __timeout=0x0, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/bits/poll2.h:77
#2  qemu_poll_ns (fds=<optimized out>, nfds=<optimized out>, timeout=timeout@entry=-1) at /home/cborntra/REPOS/qemu/qemu-timer.c:312
#3  0x0000000010191f44 in aio_poll (ctx=0x480e0890, blocking=blocking@entry=true) at /home/cborntra/REPOS/qemu/aio-posix.c:447
#4  0x00000000100c4bfe in iothread_run (opaque=0x480e05c0) at /home/cborntra/REPOS/qemu/iothread.c:42
#5  0x000003ff971884c6 in start_thread () from /lib64/libpthread.so.0
#6  0x000003ff97082ec2 in thread_start () from /lib64/libc.so.6

Thread 7 (Thread 0x3ff8ffff910 (LWP 9703)):
#0  0x000003ff970766e6 in ppoll () from /lib64/libc.so.6
#1  0x00000000101908c0 in ppoll (__ss=0x0, __timeout=0x0, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/bits/poll2.h:77
#2  qemu_poll_ns (fds=<optimized out>, nfds=<optimized out>, timeout=timeout@entry=-1) at /home/cborntra/REPOS/qemu/qemu-timer.c:312
#3  0x0000000010191f44 in aio_poll (ctx=0x480e1800, blocking=blocking@entry=true) at /home/cborntra/REPOS/qemu/aio-posix.c:447
#4  0x00000000100c4bfe in iothread_run (opaque=0x480e0d60) at /home/cborntra/REPOS/qemu/iothread.c:42
#5  0x000003ff971884c6 in start_thread () from /lib64/libpthread.so.0
#6  0x000003ff97082ec2 in thread_start () from /lib64/libc.so.6

Thread 6 (Thread 0x3ff8f7ff910 (LWP 9704)):
#0  0x000003ff970766e6 in ppoll () from /lib64/libc.so.6
#1  0x00000000101908c0 in ppoll (__ss=0x0, __timeout=0x0, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/bits/poll2.h:77
#2  qemu_poll_ns (fds=<optimized out>, nfds=<optimized out>, timeout=timeout@entry=-1) at /home/cborntra/REPOS/qemu/qemu-timer.c:312
#3  0x0000000010191f44 in aio_poll (ctx=0x480e1f60, blocking=blocking@entry=true) at /home/cborntra/REPOS/qemu/aio-posix.c:447
#4  0x00000000100c4bfe in iothread_run (opaque=0x480e1cb0) at /home/cborntra/REPOS/qemu/iothread.c:42
#5  0x000003ff971884c6 in start_thread () from /lib64/libpthread.so.0
#6  0x000003ff97082ec2 in thread_start () from /lib64/libc.so.6

Thread 5 (Thread 0x3ff8e2f9910 (LWP 9707)):
#0  0x000003ff9718f61e in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x000003ff9719262e in __pthread_mutex_cond_lock () from /lib64/libpthread.so.0
#2  0x000003ff9718c5be in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#3  0x00000000102011da in qemu_cond_wait (cond=<optimized out>, mutex=mutex@entry=0x103c7780 <qemu_global_mutex>) at /home/cborntra/REPOS/qemu/util/qemu-thread-posix.c:141
#4  0x0000000010044604 in qemu_kvm_wait_io_event (cpu=<optimized out>) at /home/cborntra/REPOS/qemu/cpus.c:1016
#5  qemu_kvm_cpu_thread_fn (arg=0x484ae660) at /home/cborntra/REPOS/qemu/cpus.c:1055
#6  0x000003ff971884c6 in start_thread () from /lib64/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#7  0x000003ff97082ec2 in thread_start () from /lib64/libc.so.6

Thread 4 (Thread 0x3ff8daf9910 (LWP 9708)):
#0  0x000003ff9718f61e in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x000003ff9719262e in __pthread_mutex_cond_lock () from /lib64/libpthread.so.0
#2  0x000003ff9718c5be in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#3  0x00000000102011da in qemu_cond_wait (cond=<optimized out>, mutex=mutex@entry=0x103c7780 <qemu_global_mutex>) at /home/cborntra/REPOS/qemu/util/qemu-thread-posix.c:141
#4  0x0000000010044604 in qemu_kvm_wait_io_event (cpu=<optimized out>) at /home/cborntra/REPOS/qemu/cpus.c:1016
#5  qemu_kvm_cpu_thread_fn (arg=0x484c0900) at /home/cborntra/REPOS/qemu/cpus.c:1055
#6  0x000003ff971884c6 in start_thread () from /lib64/libpthread.so.0
#7  0x000003ff97082ec2 in thread_start () from /lib64/libc.so.6

Thread 3 (Thread 0x3ff8d2f9910 (LWP 9709)):
#0  0x000003ff9718f61e in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x000003ff9719262e in __pthread_mutex_cond_lock () from /lib64/libpthread.so.0
#2  0x000003ff9718c5be in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#3  0x00000000102011da in qemu_cond_wait (cond=<optimized out>, mutex=mutex@entry=0x103c7780 <qemu_global_mutex>) at /home/cborntra/REPOS/qemu/util/qemu-thread-posix.c:141
#4  0x0000000010044604 in qemu_kvm_wait_io_event (cpu=<optimized out>) at /home/cborntra/REPOS/qemu/cpus.c:1016
#5  qemu_kvm_cpu_thread_fn (arg=0x484d2ba0) at /home/cborntra/REPOS/qemu/cpus.c:1055
#6  0x000003ff971884c6 in start_thread () from /lib64/libpthread.so.0
#7  0x000003ff97082ec2 in thread_start () from /lib64/libc.so.6

Thread 2 (Thread 0x3ff8ca7f910 (LWP 9710)):
#0  0x000003ff9718f61e in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x000003ff9719262e in __pthread_mutex_cond_lock () from /lib64/libpthread.so.0
#2  0x000003ff9718c5be in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#3  0x00000000102011da in qemu_cond_wait (cond=<optimized out>, mutex=mutex@entry=0x103c7780 <qemu_global_mutex>) at /home/cborntra/REPOS/qemu/util/qemu-thread-posix.c:141
#4  0x0000000010044604 in qemu_kvm_wait_io_event (cpu=<optimized out>) at /home/cborntra/REPOS/qemu/cpus.c:1016
#5  qemu_kvm_cpu_thread_fn (arg=0x484e4e40) at /home/cborntra/REPOS/qemu/cpus.c:1055
#6  0x000003ff971884c6 in start_thread () from /lib64/libpthread.so.0
#7  0x000003ff97082ec2 in thread_start () from /lib64/libc.so.6

Thread 1 (Thread 0x3ff98bdcbb0 (LWP 9690)):
#0  0x000003ff970766e6 in ppoll () from /lib64/libc.so.6
#1  0x00000000101908c0 in ppoll (__ss=0x0, __timeout=0x0, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/bits/poll2.h:77
#2  qemu_poll_ns (fds=<optimized out>, nfds=<optimized out>, timeout=timeout@entry=-1) at /home/cborntra/REPOS/qemu/qemu-timer.c:312
#3  0x0000000010191f44 in aio_poll (ctx=ctx@entry=0x480e00d0, blocking=blocking@entry=true) at /home/cborntra/REPOS/qemu/aio-posix.c:447
#4  0x00000000101c8ff4 in bdrv_flush (bs=bs@entry=0x480fa160) at /home/cborntra/REPOS/qemu/block/io.c:2426
#5  0x000000001018bba6 in bdrv_close (bs=bs@entry=0x480fa160) at /home/cborntra/REPOS/qemu/block.c:1914
#6  0x000000001018c0f6 in bdrv_close_all () at /home/cborntra/REPOS/qemu/block.c:1974
#7  0x0000000010014102 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at /home/cborntra/REPOS/qemu/vl.c:4687
(gdb) 

  reply	other threads:[~2015-12-16 12:54 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 18:00 [Qemu-devel] [RFC PATCH 00/40] Sneak peek of virtio and dataplane changes for 2.6 Paolo Bonzini
2015-11-24 18:00 ` [Qemu-devel] [PATCH 01/40] 9pfs: allocate pdus with g_malloc/g_free Paolo Bonzini
2015-11-30  2:27   ` Fam Zheng
2015-11-30  2:33     ` Fam Zheng
2015-11-30 16:35   ` Greg Kurz
2015-11-24 18:00 ` [Qemu-devel] [PATCH 02/40] virtio: move VirtQueueElement at the beginning of the structs Paolo Bonzini
2015-11-24 18:00 ` [Qemu-devel] [PATCH 03/40] virtio: move allocation to virtqueue_pop/vring_pop Paolo Bonzini
2015-11-30  3:00   ` Fam Zheng
2015-11-24 18:00 ` [Qemu-devel] [PATCH 04/40] virtio: introduce qemu_get/put_virtqueue_element Paolo Bonzini
2015-11-24 18:00 ` [Qemu-devel] [PATCH 05/40] virtio: read/write the VirtQueueElement a field at a time Paolo Bonzini
2015-11-30  9:47   ` Fam Zheng
2015-11-30 10:37     ` Paolo Bonzini
2015-11-24 18:00 ` [Qemu-devel] [PATCH 06/40] virtio: introduce virtqueue_alloc_element Paolo Bonzini
2015-11-24 18:00 ` [Qemu-devel] [PATCH 07/40] virtio: slim down allocation of VirtQueueElements Paolo Bonzini
2015-11-30  3:24   ` Fam Zheng
2015-11-30  8:36     ` Paolo Bonzini
2015-11-24 18:00 ` [Qemu-devel] [PATCH 08/40] vring: " Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 09/40] vring: make vring_enable_notification return void Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 10/40] virtio: combine the read of a descriptor Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 11/40] virtio: add AioContext-specific function for host notifiers Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 12/40] virtio: export vring_notify as virtio_should_notify Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 13/40] virtio-blk: fix "disabled data plane" mode Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 14/40] virtio-blk: do not use vring in dataplane Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 15/40] virtio-scsi: " Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 16/40] vring: remove Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 17/40] iothread: release AioContext around aio_poll Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 18/40] qemu-thread: introduce QemuRecMutex Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 19/40] aio: convert from RFifoLock to QemuRecMutex Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 20/40] aio: rename bh_lock to list_lock Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 21/40] qemu-thread: introduce QemuLockCnt Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 22/40] aio: make ctx->list_lock a QemuLockCnt, subsuming ctx->walking_bh Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 23/40] qemu-thread: optimize QemuLockCnt with futexes on Linux Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 24/40] aio: tweak walking in dispatch phase Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 25/40] aio-posix: remove walking_handlers, protecting AioHandler list with list_lock Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 26/40] aio-win32: " Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 27/40] aio: document locking Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 28/40] aio: push aio_context_acquire/release down to dispatching Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 29/40] quorum: use atomics for rewrite_count Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 30/40] quorum: split quorum_fifo_aio_cb from quorum_aio_cb Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 31/40] qed: introduce qed_aio_start_io and qed_aio_next_io_cb Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 32/40] block: explicitly acquire aiocontext in callbacks that need it Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 33/40] block: explicitly acquire aiocontext in bottom halves " Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 34/40] block: explicitly acquire aiocontext in timers " Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 35/40] block: explicitly acquire aiocontext in aio callbacks " Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 36/40] aio: update locking documentation Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 37/40] async: optimize aio_bh_poll Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 38/40] aio-posix: partially inline aio_dispatch into aio_poll Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 39/40] async: remove unnecessary inc/dec pairs Paolo Bonzini
2015-11-24 18:01 ` [Qemu-devel] [PATCH 40/40] dma-helpers: avoid lock inversion with AioContext Paolo Bonzini
2015-11-26  9:36 ` [Qemu-devel] [RFC PATCH 00/40] Sneak peek of virtio and dataplane changes for 2.6 Christian Borntraeger
2015-11-26  9:41   ` Christian Borntraeger
2015-11-26 10:39   ` Paolo Bonzini
2015-12-09 20:35     ` Paolo Bonzini
2015-12-16 12:54       ` Christian Borntraeger [this message]
2015-12-16 14:40         ` Christian Borntraeger
2015-12-16 17:42         ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56715EEE.6020208@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=famz@redhat.com \
    --cc=ming.lei@canonical.com \
    --cc=mlin@kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.