From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13E123D99; Thu, 20 Jul 2023 06:22:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11FD4211B; Wed, 19 Jul 2023 23:22:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=kMyO5VD0QAGAGdxVmS5onT7pkpxirlZJoxTfWvPS+OI=; b=sKkUTSTAGrySRXrA7yJnSEeKU7 pwTIPGGAM1fhU3lfi24JND0R05d6AoG9FkgOvASImWO3PiCLUKCsYdeRst/q3uzkblGx7dfPvF8GG mxtrpUrzJ9Hqxvp2KVT38+vOXonST6DJ+/o58XnKEDq4UHwfGK9XsHL9GB3HryJdFzxtVwjzy9Q6W uh5Fyu96H8RIuNcwpRN1yWf6ywBSNpTC26cezL6zyHH2/G6Ok12ySrRbe2AaXFxgc88i+S3X8/yCx E8lq0exbezp9I8NCl4nGEOBWTMGOFqtBTKAjLJeYwbFCbBlHbD76rCXYZJt8GqDkGg/9Zr1Zy4Ovp TFH1a/Xg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qMN39-009vKi-0L; Thu, 20 Jul 2023 06:22:07 +0000 Date: Wed, 19 Jul 2023 23:22:07 -0700 From: Christoph Hellwig To: "Michael S. Tsirkin" Cc: Christoph Hellwig , Xuan Zhuo , virtualization@lists.linux-foundation.org, Jason Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH vhost v11 03/10] virtio_ring: introduce virtqueue_set_premapped() Message-ID: References: <20230710034237.12391-1-xuanzhuo@linux.alibaba.com> <20230710034237.12391-4-xuanzhuo@linux.alibaba.com> <20230713104542-mutt-send-email-mst@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230713104542-mutt-send-email-mst@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On Thu, Jul 13, 2023 at 10:47:23AM -0400, Michael S. Tsirkin wrote: > There are a gazillion virtio drivers and most of them just use the > virtio API, without bothering with these micro-optimizations. virtio > already tracks addresses so mapping/unmapping them for DMA is easier > done in the core. It's only networking and only with XDP where the > difference becomes measureable. Yes, but now you two differing code paths (which then branch into another two with the fake DMA mappings). I'm really worried about the madness that follows like the USB dma mapping code that is a constant soure of trouble.