From mboxrd@z Thu Jan 1 00:00:00 1970 From: OHMURA Kei Subject: Re: virtio_blk_load() question Date: Thu, 18 Mar 2010 18:42:16 +0900 Message-ID: <4BA1F578.4040500@lab.ntt.co.jp> References: <4BA1AC4A.2070402@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 tama50.ecl.ntt.co.jp ([129.60.39.147]:49783 "EHLO tama50.ecl.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751261Ab0CRJmb (ORCPT ); Thu, 18 Mar 2010 05:42:31 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Thanks for your reply. > When I ported virtio to vmstate, I was unable to get that list not empty > for more than I tried. It should be not empty in the case of one error > or similar, but I was not able to reproduce it. Actually, I wasn't able to get that condition either. We're having problem in loading continuously sent VM image, and were looking deeper into the device models. We were doubting the virtio_blk_load() first, but seems to be different. > I agree this change is ok/needed. Notice that my series ( [PATCH 0/9] > Virtio cleanups) that changes it to a QLIST and fixes it. I guess you're mentioning the following patch, and it's good to know that. http://www.mail-archive.com/qemu-devel@nongnu.org/msg27324.html However, although QLIST_INSERT_HEAD is used, virtio_blk_save() is adding requests to the tail of the list, and if we need to keep the order of outstading requests, shouldn't we put incoming requests to the tail in virtio_blk_load()? From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NsCFB-0002kv-HY for qemu-devel@nongnu.org; Thu, 18 Mar 2010 05:42:21 -0400 Received: from [199.232.76.173] (port=54583 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsCFB-0002kP-1h for qemu-devel@nongnu.org; Thu, 18 Mar 2010 05:42:21 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NsCF9-0002td-DF for qemu-devel@nongnu.org; Thu, 18 Mar 2010 05:42:20 -0400 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]:49777) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NsCF8-0002tJ-PU for qemu-devel@nongnu.org; Thu, 18 Mar 2010 05:42:19 -0400 Message-ID: <4BA1F578.4040500@lab.ntt.co.jp> Date: Thu, 18 Mar 2010 18:42:16 +0900 From: OHMURA Kei MIME-Version: 1.0 References: <4BA1AC4A.2070402@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 Thanks for your reply. > When I ported virtio to vmstate, I was unable to get that list not empty > for more than I tried. It should be not empty in the case of one error > or similar, but I was not able to reproduce it. Actually, I wasn't able to get that condition either. We're having problem in loading continuously sent VM image, and were looking deeper into the device models. We were doubting the virtio_blk_load() first, but seems to be different. > I agree this change is ok/needed. Notice that my series ( [PATCH 0/9] > Virtio cleanups) that changes it to a QLIST and fixes it. I guess you're mentioning the following patch, and it's good to know that. http://www.mail-archive.com/qemu-devel@nongnu.org/msg27324.html However, although QLIST_INSERT_HEAD is used, virtio_blk_save() is adding requests to the tail of the list, and if we need to keep the order of outstading requests, shouldn't we put incoming requests to the tail in virtio_blk_load()?