From mboxrd@z Thu Jan 1 00:00:00 1970 From: OHMURA Kei Subject: Re: virtio_blk_load() question Date: Fri, 19 Mar 2010 11:53:48 +0900 Message-ID: <4BA2E73C.1080405@lab.ntt.co.jp> References: <4BA1AC4A.2070402@lab.ntt.co.jp> <4BA1F578.4040500@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" , Avi Kivity , Yoshiaki Tamura , ohmura.kei@lab.ntt.co.jp To: Juan Quintela Return-path: Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]:58864 "EHLO tama500.ecl.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751951Ab0CSCyH (ORCPT ); Thu, 18 Mar 2010 22:54:07 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 2010/03/18 21:07, Juan Quintela wrote: > Really, ordering doesn't matter (in this case): > > see virtio-blk.c:virtio_blk_dma_restart_bh() > > QLIST_FOREACH_SAFE(req, &rq_copy, next, next_req) { > QLIST_REMOVE(req, next); > virtio_blk_handle_request(req, &mrb); > } > > This mean that we are just removing from the beggining and addin from > the beginnig (i.e. reversing). Adding by the beggining made it easier, > but I can change if you mean. Thanks, I understood. However, since it's difficult to understand this at first glance, it would be great if you could modify, but I'm OK if you could just add comments on this to the exiting patch. It's kind for a newbie like me. > Notice that except if there are any errors (I was not able to trigger > it, but didnt' try too hard), that list is going to be syncked in the > > qemu_aio_flush(); > bdrv_flush_all(); > > in migrate_fd_put_ready(), so it is not trivial to hit it and probably > the difference is just theoretical. Thank you for your information. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NsSLT-0006G6-Oy for qemu-devel@nongnu.org; Thu, 18 Mar 2010 22:53:55 -0400 Received: from [199.232.76.173] (port=53830 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsSLT-0006FW-1d for qemu-devel@nongnu.org; Thu, 18 Mar 2010 22:53:55 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NsSLP-0006WW-Af for qemu-devel@nongnu.org; Thu, 18 Mar 2010 22:53:54 -0400 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]:58861) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NsSLO-0006WO-Ln for qemu-devel@nongnu.org; Thu, 18 Mar 2010 22:53:51 -0400 Message-ID: <4BA2E73C.1080405@lab.ntt.co.jp> Date: Fri, 19 Mar 2010 11:53:48 +0900 From: OHMURA Kei MIME-Version: 1.0 References: <4BA1AC4A.2070402@lab.ntt.co.jp> <4BA1F578.4040500@lab.ntt.co.jp> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: virtio_blk_load() question List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: ohmura.kei@lab.ntt.co.jp, Yoshiaki Tamura , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , Avi Kivity On 2010/03/18 21:07, Juan Quintela wrote: > Really, ordering doesn't matter (in this case): > > see virtio-blk.c:virtio_blk_dma_restart_bh() > > QLIST_FOREACH_SAFE(req, &rq_copy, next, next_req) { > QLIST_REMOVE(req, next); > virtio_blk_handle_request(req, &mrb); > } > > This mean that we are just removing from the beggining and addin from > the beginnig (i.e. reversing). Adding by the beggining made it easier, > but I can change if you mean. Thanks, I understood. However, since it's difficult to understand this at first glance, it would be great if you could modify, but I'm OK if you could just add comments on this to the exiting patch. It's kind for a newbie like me. > Notice that except if there are any errors (I was not able to trigger > it, but didnt' try too hard), that list is going to be syncked in the > > qemu_aio_flush(); > bdrv_flush_all(); > > in migrate_fd_put_ready(), so it is not trivial to hit it and probably > the difference is just theoretical. Thank you for your information.