From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaO3U-0001QU-Fc for qemu-devel@nongnu.org; Mon, 19 Nov 2012 04:54:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TaO3R-0006fq-Df for qemu-devel@nongnu.org; Mon, 19 Nov 2012 04:54:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35638) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TaO3R-0006fV-5v for qemu-devel@nongnu.org; Mon, 19 Nov 2012 04:54:13 -0500 Message-ID: <50AA01C0.8030709@redhat.com> Date: Mon, 19 Nov 2012 10:54:08 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <589082222.7272963.1352241778123.JavaMail.root@redhat.com> <50A95A6A.4010109@profihost.ag> <50A9E991.2070609@redhat.com> <50A9FD86.3050400@profihost.ag> In-Reply-To: <50A9FD86.3050400@profihost.ag> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] scsi-hd with discard_granularity and unmap results in Aborted Commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Priebe - Profihost AG Cc: qemu-devel@nongnu.org Il 19/11/2012 10:36, Stefan Priebe - Profihost AG ha scritto: > Hi Paolo, > > Am 19.11.2012 09:10, schrieb Paolo Bonzini: >>> I'm sorry the discard requests aren't failing. Qemu / Block driver >>> starts to cancel a bunch of requests. >> >> That is being done in the kernel (the guest, I think) because the UNMAPs >> are taking too long. > > That makes sense. RBD handles discards as buffered I/O. When i do an > mkfs.xfs on a 30GB device i see around 900 pending discard requests. rbd > finishes them all before reporting success. > > If it is correct that a 3.6.7 kernel sends as many discard requests i > only the a solution in using unbuffered I/O for discards. > > Do you know what is the correct way? I think the correct fix is to serialize them in the kernel. Paolo