Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5279663pxu; Tue, 22 Dec 2020 12:40:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJH5ZjWy7qtpDBrcCxeQAupyNuPl+DBAArOw7t2UJ2H579gpDR5HyTndsE6pU33djXcs5l X-Received: by 2002:a17:906:c790:: with SMTP id cw16mr21554278ejb.344.1608669627485; Tue, 22 Dec 2020 12:40:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608669627; cv=none; d=google.com; s=arc-20160816; b=alEK4KuLzKaHobhl4Olges4tRL6Ju0LoX6p2KwzIwE41FW1xbi6X6fiNq1YnEk3Gei UYArWxeaw//Mguo4QRFNbbEjC3FhRWwECXmP/a8owjDJF8LivAfITD5GbT8OOsfjvK4j KXGR0w8jHdXOdbX6YkcUq+wFs7pwbgFMGDN7YHHrVnIfTLHv8YCDvCOefpTIuqacF0Ss Qfk0BDwsxk1HaREPcRhY+RNq06PiG+5mdMpm/vGpnGsgr4mrntCbCW3pc825DwBa8vod mqJOpV+Dk7uHGfF4WT3GeKbSF/OOlD4Rtr8v6cA5+SqPeAbTVYd6VgSP3tjkxihBDplF FG0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=w7wUorTulI1SLGLyUAtcsZM5JvELPWd2Jp06S7SjCVY=; b=lWUdGRmUi+XYzf72/8rR/Igg8S9BafWD3r9vwb+AdMf4HRWGabyt+L1p8ZnDbLI7Fc LW1pkA+RAD0C2zi2Mpl7wxCdI+zUHk9P8VO5gj7CNSnEC4S7iDJJPiuzsaAXgqcuiJAb 5NK1G48uEVs4LA6F/KvjNQhFuxuUwdh8Hk/W0cw6vmwBqLJ0c09gPJ8z6MZlB9Qtum8t 55vM+PgNuCRQgZZW0/xfGV5pBVAuhdAK5zgXbsWSK1pVrybTvtuz5hXr1wPRhXjGP0sJ RDVC8uGReu2ozmPj33URQc20Iz22bEWNmfANhSw6yKOWL/Ls5XchuMmcHmsXEpJRrljX x6/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=ZNsgbNsR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e20si11524176edr.71.2020.12.22.12.40.04; Tue, 22 Dec 2020 12:40:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=ZNsgbNsR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727235AbgLVUjK (ORCPT + 99 others); Tue, 22 Dec 2020 15:39:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbgLVUjK (ORCPT ); Tue, 22 Dec 2020 15:39:10 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C5C3C061793 for ; Tue, 22 Dec 2020 12:38:30 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id t6so8029007plq.1 for ; Tue, 22 Dec 2020 12:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=w7wUorTulI1SLGLyUAtcsZM5JvELPWd2Jp06S7SjCVY=; b=ZNsgbNsRLxQLY7+11c14jHqKYzrHQmsqrg+2m3ddf/Ug+scMbC5go73SdBpHMpQPyB FJvf7yfTrnVexb1ow0kk7CQzb2GRgaAKJLzXYhW+AMwQoJT8XPclFaqDzu06DNB+CE5b gpM3g+Xh7axYHWU2/IgxH7oBU0Zn4r0jSYQmlxCZtrm0DZiozBRJdv/1YToFSbMoo2Id u2Eg77AGoZCB8QKdLxHb08aagEkZ3b4wLNrs2/eTCpNxNU5wZ4HEbmxT14k41CXmXYhI 2KGtcBnabjtrtI/HH4vQtz7s91OwZtX1Dq3vbbQGyKuJJGyLQWJg94hsYWuf/v3eusrS lOHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=w7wUorTulI1SLGLyUAtcsZM5JvELPWd2Jp06S7SjCVY=; b=dRgVdqKQIorzl1Tn8Cz1UcGnn3yGwt7bRyTZ7ALc7O73ptpd+JLWt0QfIngPGuncQ+ ULAO029+Z81cke/skyTjYZJTUsiGH3Uq4frVB9APIZbUOMvUvl/vmUh3esaTZb6/Z1mB jLt5Jhz4OHQr+5peuLdNzod46XvOZxfZ1lHMJoSJ4p1/pfrsXQ/s8Ec+WGu4+fThtK1t bQQ7EwMvfjWKOCc5mdCUj29610izN1G1yGUqQDEr0H6U/+iXv7tiUo65HKIEZhoTp45n B0W9eVohi0n3Z3ajYopfmgaLW6sSD/SHxD3au8oU0/aJqYsRiTRB+0Qon7bgYSrBHQaD RoCg== X-Gm-Message-State: AOAM531L4fLIRWiIdbFMiqO+L5yI/Zm86tVrL2ZuP61Wd9VMAktYtlP6 ia5zoHhQ5whdDqQRnOAACLMnhg== X-Received: by 2002:a17:90a:301:: with SMTP id 1mr23852780pje.195.1608669509537; Tue, 22 Dec 2020 12:38:29 -0800 (PST) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id g30sm21624684pfr.152.2020.12.22.12.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Dec 2020 12:38:28 -0800 (PST) Date: Tue, 22 Dec 2020 12:38:28 -0800 (PST) X-Google-Original-Date: Tue, 22 Dec 2020 12:38:26 PST (-0800) Subject: Re: [PATCH v1 0/5] dm: dm-user: New target that proxies BIOs to userspace In-Reply-To: <20201222143616.GB12885@redhat.com> CC: Christoph Hellwig , josef@toxicpanda.com, bvanassche@acm.org, corbet@lwn.net, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, song@kernel.org, dm-devel@redhat.com, linux-kselftest@vger.kernel.org, shuah@kernel.org, agk@redhat.com, michael.christie@oracle.com From: Palmer Dabbelt To: snitzer@redhat.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Dec 2020 06:36:16 PST (-0800), snitzer@redhat.com wrote: > On Tue, Dec 22 2020 at 8:32am -0500, > Christoph Hellwig wrote: > >> On Mon, Dec 14, 2020 at 07:00:57PM -0800, Palmer Dabbelt wrote: >> > I haven't gotten a whole lot of feedback, so I'm inclined to at least have some >> > reasonable performance numbers before bothering with a v2. >> >> FYI, my other main worry beside duplicating nbd is that device mapper >> really is a stacked interface that sits on top of other block device. >> Turning this into something else that just pipes data to userspace >> seems very strange. > > I agree. Only way I'd be interested is if it somehow tackled enabling > much more efficient IO. Earlier discussion in this thread mentioned > that zero-copy and low overhead wasn't a priority (because it is hard, > etc). But the hard work has already been done with io_uring. If > dm-user had a prereq of leaning heavily on io_uring and also enabled IO > polling for bio-based then there may be a win to supporting it. > > But unless lower latency (or some other more significant win) is made > possible I just don't care to prop up an unnatural DM bolt-on. I don't remember if I mentioned this in the thread, but it was definately in the Plumbers talk, but I'd had the general idea bouncing around that it would be possible to write a high-performance version of this using an interface similar to the one provided here while relying on io_uring for the high-performance userspace. That definately won't work with exactly the current interface, but my hope was to avoid writing my own high-performance ring buffer. My worry was that it'll be too tricky to map this all to zero-copy, and I guess I forgot about it. Now that you bring it up, it certainly seems worth taking a shot at. We'd essentially have the best of both worlds: userspace implementations that want to be simple could just use read()/write(), while those that want to be higher performance could have their implicit ring buffer. I'm currently trying to put together a benchmarking setup that is of sufficient fidelity that I would believe the numbers, which is really why I don't have any performance numbers yet (no sense posting numbers I would shoot down :)). I'll try to remember to take a shot at an io_uring based userspace (probably with some dm-user interface modifications) to see how it feels.