Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2041735rwb; Wed, 5 Oct 2022 08:15:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6xkYtIwzdnOvgP0svpZjo0QXw9RcgdlcubmwFVjo3LUS62tRI8YPPlbp863vHK+ZUmvSmU X-Received: by 2002:a17:902:ced1:b0:17f:5d83:920c with SMTP id d17-20020a170902ced100b0017f5d83920cmr5072plg.155.1664982934812; Wed, 05 Oct 2022 08:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664982934; cv=none; d=google.com; s=arc-20160816; b=UIkacvrRoCtF/ybm2HGbQR949a9aA4CRT1fkHUkfpBbRrTveuvZSBMcQVq1bRuIbXS xnqQVECO9vMT6DCLhKvIHen+l2yWKIQGqH5B7IU+sKaflxc+avr5W1hLFsrcMinS2prl VcQ4Gpx589AxvZNJ0gWGlNUi2iRcWSKnVM544GVsiXL9UWvfvesnahJdjbqbWNf/YhTc 2BEU6iTm/nBhj2vv9Tib++hyvuhiFxxUX5AysB3xFWba5YMy9xbd1QbSGE5Z1eDB/H0i WjTbaaehhlbLGh31UPW67dJv5zPTbjs875c6ovPw17+I7c8fRgvs7JgnhWMQvCpGPLWt fv0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/WGubC4HbVqcwNsvts+AiFEUTLkMeqajhao/HLtOsbc=; b=LLIHOjXUY5Pq/fSbvs4Bjds4P6/xYzpwaf2dTaepXyEwHxXCASLrJ0gA7KgFk73hEn jkzITm1BVjGlVhnkh1usdqtTiMCF9/0tENsIPk1J7h+trfl1V97hsifVYCZpS7IZSwyX qn2eaQaRnL0wYlrtsaNijLHA1N9uzm34Z0XEXaCglz0jus7m+X1Nv4Kv4h5YKphVyvnx AHGF9bWqu0W+7O3RnDEtiDGlXOcvjvidNomkQ9cIvSVfeve/EEJ8Lnz0O7UvUf/SiGdP hWpLEicDCwSayT9bDzO14OHzzkdDzzaiPJO6Op/rSO40RN6Whr4k+Pi/RN0P9wQbKsYe 8dUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SZtfm7sR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i64-20020a638743000000b0044af51e7d4bsi10651818pge.75.2022.10.05.08.14.49; Wed, 05 Oct 2022 08:15:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SZtfm7sR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbiJEPMF (ORCPT + 99 others); Wed, 5 Oct 2022 11:12:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230118AbiJEPME (ORCPT ); Wed, 5 Oct 2022 11:12:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 685BC6DFB1 for ; Wed, 5 Oct 2022 08:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664982722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/WGubC4HbVqcwNsvts+AiFEUTLkMeqajhao/HLtOsbc=; b=SZtfm7sRyk+E1DIn5oqOLxHPi+nxaR9mVnMzC7g3xxL20v1jEzbxFmKQ7sprG42Bg7GI6j zLEeEF8HAS+jADMzgilYx8I0jpnsYrr4+fAONqSibh3+3y4WHisZDoEDm6hXB+KapgvqNR 0wkGnsaGdQ/LwakZLwJ09L38RQJ7CJY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-636-Pud9b8BxNhaiVC77lbmreg-1; Wed, 05 Oct 2022 11:12:01 -0400 X-MC-Unique: Pud9b8BxNhaiVC77lbmreg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3E66C3C0D1A4; Wed, 5 Oct 2022 15:11:58 +0000 (UTC) Received: from localhost (unknown [10.39.193.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 59626C15BA4; Wed, 5 Oct 2022 15:11:51 +0000 (UTC) Date: Wed, 5 Oct 2022 11:11:32 -0400 From: Stefan Hajnoczi To: "Denis V. Lunev" Cc: Ming Lei , io-uring@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Kirill Tkhai , Manuel Bentele , qemu-devel@nongnu.org, Kevin Wolf , rjones@redhat.com, Xie Yongji , Stefano Garzarella , Josef Bacik Subject: Re: ublk-qcow2: ublk-qcow2 is available Message-ID: References: <6659a0d5-60ab-9ac7-d25d-b4ff1940c6ab@virtuozzo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0HJHRezJw1wbMhDd" Content-Disposition: inline In-Reply-To: <6659a0d5-60ab-9ac7-d25d-b4ff1940c6ab@virtuozzo.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0HJHRezJw1wbMhDd Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 04, 2022 at 01:57:50AM +0200, Denis V. Lunev wrote: > On 10/3/22 21:53, Stefan Hajnoczi wrote: > > On Fri, Sep 30, 2022 at 05:24:11PM +0800, Ming Lei wrote: > > > ublk-qcow2 is available now. > > Cool, thanks for sharing! > yep >=20 > > > So far it provides basic read/write function, and compression and sna= pshot > > > aren't supported yet. The target/backend implementation is completely > > > based on io_uring, and share the same io_uring with ublk IO command > > > handler, just like what ublk-loop does. > > >=20 > > > Follows the main motivations of ublk-qcow2: > > >=20 > > > - building one complicated target from scratch helps libublksrv APIs/= functions > > > become mature/stable more quickly, since qcow2 is complicated and = needs more > > > requirement from libublksrv compared with other simple ones(loop, = null) > > >=20 > > > - there are several attempts of implementing qcow2 driver in kernel, = such as > > > ``qloop`` [2], ``dm-qcow2`` [3] and ``in kernel qcow2(ro)`` [4], s= o ublk-qcow2 > > > might useful be for covering requirement in this field > There is one important thing to keep in mind about all partly-userspace > implementations though: > * any single allocation happened in the context of the > =A0=A0 userspace daemon through try_to_free_pages() in > =A0=A0 kernel has a possibility to trigger the operation, > =A0=A0 which will require userspace daemon action, which > =A0=A0 is inside the kernel now. > * the probability of this is higher in the overcommitted > =A0=A0 environment >=20 > This was the main motivation of us in favor for the in-kernel > implementation. CCed Josef Bacik because the Linux NBD driver has dealt with memory reclaim hangs in the past. Josef: Any thoughts on userspace block drivers (whether NBD or ublk) and how to avoid hangs in memory reclaim? Stefan --0HJHRezJw1wbMhDd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmM9nqQACgkQnKSrs4Gr c8iEoAf/eIubb5NIhncZ0gl2w50kSq02L7TslR04+6oMZQN+WN/pe3IPaCA2AFEC 5FronSoFT2uNPoARvGAzXKOMgM6L3qLtrstcvVRDm46hBbmJewj6Z3/7oT/KRr5t vJtZLmOW4vItXWRmC2v41SmKgkOKMqESjCcBrVXUSXRvYCIsD516MjSE3r+0Lawa hPrbD4/1SAz5P0Qtoh1rqFiDSqIpqA7X86InkW/+GHNv0t3pw6E0Bp/CbPC0UVrf XU/34RMn/0+ETiTLsrUXgirmHdimpxNdnRgmFGYSsrbwI/Yy0k/2aqQF/JWAo1zi 6el/KNsveFmDYtRkVC1tYgcwFFNFpw== =xRRN -----END PGP SIGNATURE----- --0HJHRezJw1wbMhDd--