From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1BBw-000377-6A for qemu-devel@nongnu.org; Tue, 24 Nov 2015 05:51:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1BBu-0000fd-LZ for qemu-devel@nongnu.org; Tue, 24 Nov 2015 05:51:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1BBu-0000fZ-FE for qemu-devel@nongnu.org; Tue, 24 Nov 2015 05:51:18 -0500 References: <1447978868-17138-1-git-send-email-mlin@kernel.org> <56506D95.70101@redhat.com> <1448266667.18175.5.camel@hasee> <56531F5F.3050709@redhat.com> <1448350074.6696.3.camel@hasee> From: Paolo Bonzini Message-ID: <56544122.3010300@redhat.com> Date: Tue, 24 Nov 2015 11:51:14 +0100 MIME-Version: 1.0 In-Reply-To: <1448350074.6696.3.camel@hasee> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lin Cc: qemu-devel@nongnu.org, Christoph Hellwig , linux-nvme@lists.infradead.org, virtualization@lists.linux-foundation.org On 24/11/2015 08:27, Ming Lin wrote: > handle_notify (qemu/hw/block/dataplane/virtio-blk.c:126) > aio_dispatch (qemu/aio-posix.c:329) > aio_poll (qemu/aio-posix.c:474) > iothread_run (qemu/iothread.c:45) > start_thread (pthread_create.c:312) > /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) > > I think I'll have a "nvme_dev_notify" similar as "handle_notify" > > static void nvme_dev_notify(EventNotifier *e) > { > .... > } > > But then how can I know this notify is for cq or sq? virtio-blk has a single queue, so it has a single EventNotifier. Your code using multiple EventNotifiers is fine, you can use aio_set_event_notifier multiple times on the same iothread. Paolo