Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3898552rwl; Sun, 2 Apr 2023 18:17:11 -0700 (PDT) X-Google-Smtp-Source: AKy350bH6Zfd9gESS2OzKqbutJXQtddgwWOVvd0vaVj9qodRoMKoDsFBwh6L+zhNYnNN6FtLxsTi X-Received: by 2002:a17:903:245:b0:1a1:e5ec:31ae with SMTP id j5-20020a170903024500b001a1e5ec31aemr17055726plh.23.1680484630893; Sun, 02 Apr 2023 18:17:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680484630; cv=none; d=google.com; s=arc-20160816; b=B42xOjXO8st0AgOXCqcIgpxZfNi73QGnW2EQcIkYdifKI19MMragfB0Aklio/bB3Ms zau55wydWg5mlJdgPC0zOoMolCVsxca2FBhbyGLc3XluDMWfd9sbBY8QI2gLcpsFMS2z KHkhEk1VthVSAgsXPCsZ3G0caxEL5HtQRnDticvv7gjT6D7rDOqgJGdHIy/fc9+l6Ma9 I19nLUa8pvb0d3TcqKfB66amlx0jbhq8D8OZPOx2jz22C/glftb5a4ymIPamwRQpqp3o PS8unZ6o5TWqBb/X8k+SklRQbWHbW2LY939gK7xDF2jl/iqYXfHDU1MbqW5+K6UhDtIr 1W2Q== 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=AQE8Zgt4vs0BP5OpIWmWFH54NBQOZeUZ1VG+31AaATI=; b=ZXIKnZiJlsGW+rI9TMZK3urxaXORXFVwoofBqy0np7vZc+SuIesAK6QMaQArbKUh0t ChUBqX3xEyppKfUmk7990R06UrMZDpyutuUH3AmtCdjIFHiUXXMi+rpYqnT1g3JCbcR8 PVnAqUR8P26Z6GavcXuERGGK4ytkcQjEgfcVMb2ejhdLt7FgPJLN3OzaZ499T8Uk40h5 +WnUezcLsXe0pdKfAHNsin0uXv74GAtpT9955raMmfJXMH+JFbGO9XgeCv2EdaVfwjZ2 lGJOJGYkv/KPzDxMMY2ySVc1MDbou8GIhpvtdo6jesC6RF1br2ztE0L9QUFtZwge/FzM 1GkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=V0zlXHU4; 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 kv4-20020a17090328c400b001a1b6562148si6881886plb.96.2023.04.02.18.16.58; Sun, 02 Apr 2023 18:17:10 -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=V0zlXHU4; 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 S230200AbjDCBMT (ORCPT + 99 others); Sun, 2 Apr 2023 21:12:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230269AbjDCBMR (ORCPT ); Sun, 2 Apr 2023 21:12:17 -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 E1F06AD01 for ; Sun, 2 Apr 2023 18:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680484288; 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=AQE8Zgt4vs0BP5OpIWmWFH54NBQOZeUZ1VG+31AaATI=; b=V0zlXHU48dHE0HZ66hFaVwP0cRSS8395Q6BdWMx61na54IRTwjGtEIuUrleryVolIleZ9X Von13numZUOTe9mUcDuvGPjzV3gsxheiQ+nMof7+X4KW+szIajZ/2z9LveIwv2b6et2zXm gQ25ramO2YOYjOz4m1b0ea0P5HcRPHI= 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-58-uKq9kBVwPJGFRqjSzmVk-w-1; Sun, 02 Apr 2023 21:11:25 -0400 X-MC-Unique: uKq9kBVwPJGFRqjSzmVk-w-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 903203804507; Mon, 3 Apr 2023 01:11:24 +0000 (UTC) Received: from ovpn-8-18.pek2.redhat.com (ovpn-8-18.pek2.redhat.com [10.72.8.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 28F762166B3F; Mon, 3 Apr 2023 01:11:16 +0000 (UTC) Date: Mon, 3 Apr 2023 09:11:11 +0800 From: Ming Lei To: Jens Axboe , io-uring@vger.kernel.org, linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Miklos Szeredi , ZiyangZhang , Xiaoguang Wang , Bernd Schubert , Pavel Begunkov , Stefan Hajnoczi , Dan Williams , ming.lei@redhat.com Subject: Re: [PATCH V6 00/17] io_uring/ublk: add generic IORING_OP_FUSED_CMD Message-ID: References: <20230330113630.1388860-1-ming.lei@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230330113630.1388860-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 On Thu, Mar 30, 2023 at 07:36:13PM +0800, Ming Lei wrote: > Hello Jens and Guys, > > Add generic fused command, which can include one primary command and multiple > secondary requests. This command provides one safe way to share resource between > primary command and secondary requests, and primary command is always > completed after all secondary requests are done, and resource lifetime > is bound with primary command. > > With this way, it is easy to support zero copy for ublk/fuse device, and > there could be more potential use cases, such as offloading complicated logic > into userspace, or decouple kernel subsystems. > > Follows ublksrv code, which implements zero copy for loop, nbd and > qcow2 targets with fused command: > > https://github.com/ming1/ubdsrv/tree/fused-cmd-zc-for-v6 > > All three(loop, nbd and qcow2) ublk targets have supported zero copy by passing: > > ublk add -t [loop|nbd|qcow2] -z .... > > Also add liburing test case for covering fused command based on miniublk > of blktest. > > https://github.com/ming1/liburing/tree/fused_cmd_miniublk_for_v6 > > Performance improvement is obvious on memory bandwidth related workloads, > such as, 1~2X improvement on 64K/512K BS IO test on loop with ramfs backing file. > ublk-null shows 5X IOPS improvement on big BS test when the copy is avoided. > > Please review and consider for v6.4. > > V6: > - re-design fused command, and make it more generic, moving sharing buffer > as one plugin of fused command, so in future we can implement more plugins > - document potential other use cases of fused command > - drop support for builtin secondary sqe in SQE128, so all secondary > requests has standalone SQE > - make fused command as one feature > - cleanup & improve naming Hi Jens, Can you apply ublk cleanup patches 7~11 on for-6.4? For others, we may delay to 6.5, and I am looking at other approach too. Thanks, Ming