From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2732C433E2 for ; Fri, 10 Jul 2020 13:27:19 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 99D12207BB for ; Fri, 10 Jul 2020 13:27:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="N80RV3Lq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99D12207BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6F689885E2; Fri, 10 Jul 2020 13:27:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HjCwcGivKWJ3; Fri, 10 Jul 2020 13:27:18 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id CEAAD885BE; Fri, 10 Jul 2020 13:27:18 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C115BC0890; Fri, 10 Jul 2020 13:27:18 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 050F1C016F for ; Fri, 10 Jul 2020 13:27:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E38A020415 for ; Fri, 10 Jul 2020 13:27:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t-LbA6Bz3jbT for ; Fri, 10 Jul 2020 13:27:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by silver.osuosl.org (Postfix) with ESMTPS id DA2962045A for ; Fri, 10 Jul 2020 13:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594387634; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8A/1vpEmoSOyHkkH6nhIq0DHvbGeWI2fZCwGb0gKD0U=; b=N80RV3LqN5bz2s18o0c3FN3L0JmGOPh/GZ4R8AhH+psuFLh04qlI7x8FV0J6P7dbcjuWG4 7ikTbJPZk5SA0e2pcSSvam/QFinDDNVZ6ciAZG6MeAm4WN0sx9h/COgj5R/6e6mydYzacf jV2u+UCSAJM1lEg2MOiabTsfIBPfe60= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-354-iB5ik_0TPn-3lfedhmvmhg-1; Fri, 10 Jul 2020 09:27:10 -0400 X-MC-Unique: iB5ik_0TPn-3lfedhmvmhg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 447AB1092; Fri, 10 Jul 2020 13:27:08 +0000 (UTC) Received: from carbon (unknown [10.40.208.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACAD478A4B; Fri, 10 Jul 2020 13:27:00 +0000 (UTC) Date: Fri, 10 Jul 2020 15:26:58 +0200 From: Jesper Dangaard Brouer To: Christoph Hellwig Subject: Re: generic DMA bypass flag v4 Message-ID: <20200710152658.31a9391a@carbon> In-Reply-To: <20200708152449.316476-1-hch@lst.de> References: <20200708152449.316476-1-hch@lst.de> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Cc: Daniel Borkmann , Greg Kroah-Hartman , brouer@redhat.com, Robin Murphy , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" T24gV2VkLCAgOCBKdWwgMjAyMCAxNzoyNDo0NCArMDIwMApDaHJpc3RvcGggSGVsbHdpZyA8aGNo QGxzdC5kZT4gd3JvdGU6Cgo+IE5vdGUgdGhhdCBhcy1pcyB0aGlzIGJyZWFrcyB0aGUgWFNLIGJ1 ZmZlciBwb29sLCB3aGljaCB1bmZvcnR1bmF0ZWx5Cj4gcG9rZWQgZGlyZWN0bHkgaW50byBETUEg aW50ZXJuYWxzLiAgQSBmaXggZm9yIHRoYXQgaXMgYWxyZ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bWFuL2xpc3RpbmZvL2lvbW11 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46E52C433E1 for ; Fri, 10 Jul 2020 22:47:26 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9CEC12065F for ; Fri, 10 Jul 2020 22:47:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AcEjwilm"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AcEjwilm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9CEC12065F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4B3Spy6GfpzDrNd for ; Sat, 11 Jul 2020 08:47:22 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=205.139.110.61; helo=us-smtp-delivery-1.mimecast.com; envelope-from=brouer@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=AcEjwilm; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=AcEjwilm; dkim-atps=neutral Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4B3DNs4VQKzDrN4 for ; Fri, 10 Jul 2020 23:27:18 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594387635; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8A/1vpEmoSOyHkkH6nhIq0DHvbGeWI2fZCwGb0gKD0U=; b=AcEjwilm7DLnOVFr+fqkDAPCLhOrdZ1n+NiWATsh5+cVJXT+MmpLXgiRURdTIvQ0fzLtWg ZxQo6TD1cR78xGuhfKvJ/DMa58r4sT/C0K2fWlO5pZw+RADLHJ5gh5QaL3lsD+tMJnicH6 uJT5vFTbsFlpPsodXtn0szOeAK8K3D0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594387635; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8A/1vpEmoSOyHkkH6nhIq0DHvbGeWI2fZCwGb0gKD0U=; b=AcEjwilm7DLnOVFr+fqkDAPCLhOrdZ1n+NiWATsh5+cVJXT+MmpLXgiRURdTIvQ0fzLtWg ZxQo6TD1cR78xGuhfKvJ/DMa58r4sT/C0K2fWlO5pZw+RADLHJ5gh5QaL3lsD+tMJnicH6 uJT5vFTbsFlpPsodXtn0szOeAK8K3D0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-354-iB5ik_0TPn-3lfedhmvmhg-1; Fri, 10 Jul 2020 09:27:10 -0400 X-MC-Unique: iB5ik_0TPn-3lfedhmvmhg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 447AB1092; Fri, 10 Jul 2020 13:27:08 +0000 (UTC) Received: from carbon (unknown [10.40.208.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACAD478A4B; Fri, 10 Jul 2020 13:27:00 +0000 (UTC) Date: Fri, 10 Jul 2020 15:26:58 +0200 From: Jesper Dangaard Brouer To: Christoph Hellwig Subject: Re: generic DMA bypass flag v4 Message-ID: <20200710152658.31a9391a@carbon> In-Reply-To: <20200708152449.316476-1-hch@lst.de> References: <20200708152449.316476-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mailman-Approved-At: Sat, 11 Jul 2020 08:45:41 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Borkmann , Alexey Kardashevskiy , Greg Kroah-Hartman , Joerg Roedel , brouer@redhat.com, Robin Murphy , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , linuxppc-dev@lists.ozlabs.org, Lu Baolu Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, 8 Jul 2020 17:24:44 +0200 Christoph Hellwig wrote: > Note that as-is this breaks the XSK buffer pool, which unfortunately > poked directly into DMA internals. A fix for that is already queued > up in the netdev tree. >=20 > Jesper and XDP gang: this should not regress any performance as > the dma-direct calls are now inlined into the out of line DMA mapping > calls. But if you can verify the performance numbers that would be > greatly appreciated. =46rom a superficial review of the patches, they look okay to me. I don't have time to run a performance benchmark (before I go on vacation). I hoped Bj=C3=B6rn could test/benchmark this(?), given (as mentioned) this also affect XSK / AF_XDP performance. --=20 Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63803C433E3 for ; Fri, 10 Jul 2020 13:27:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34906207BB for ; Fri, 10 Jul 2020 13:27:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZTvIS/3V" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727871AbgGJN1O (ORCPT ); Fri, 10 Jul 2020 09:27:14 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:21381 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726774AbgGJN1N (ORCPT ); Fri, 10 Jul 2020 09:27:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594387632; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8A/1vpEmoSOyHkkH6nhIq0DHvbGeWI2fZCwGb0gKD0U=; b=ZTvIS/3VgfJzVLdZ1stwoHBYKFNEg5QV99BbNE1BSIougrfBUdecwRkF56iqjdNVtwObVI +rlBsqpjHeCrA40FCxLACT/dmZBWEMD7T7NqCUreOl16K2eZ7PjKU9HrW4F5Wl5W3bHjSS b2kCnU8gO2MYr5qOqBNiZYfejnP/sY4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-354-iB5ik_0TPn-3lfedhmvmhg-1; Fri, 10 Jul 2020 09:27:10 -0400 X-MC-Unique: iB5ik_0TPn-3lfedhmvmhg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 447AB1092; Fri, 10 Jul 2020 13:27:08 +0000 (UTC) Received: from carbon (unknown [10.40.208.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACAD478A4B; Fri, 10 Jul 2020 13:27:00 +0000 (UTC) Date: Fri, 10 Jul 2020 15:26:58 +0200 From: Jesper Dangaard Brouer To: Christoph Hellwig Cc: iommu@lists.linux-foundation.org, Alexey Kardashevskiy , linuxppc-dev@lists.ozlabs.org, Lu Baolu , Greg Kroah-Hartman , Joerg Roedel , Robin Murphy , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Daniel Borkmann , linux-kernel@vger.kernel.org, brouer@redhat.com Subject: Re: generic DMA bypass flag v4 Message-ID: <20200710152658.31a9391a@carbon> In-Reply-To: <20200708152449.316476-1-hch@lst.de> References: <20200708152449.316476-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 8 Jul 2020 17:24:44 +0200 Christoph Hellwig wrote: > Note that as-is this breaks the XSK buffer pool, which unfortunately > poked directly into DMA internals. A fix for that is already queued > up in the netdev tree. >=20 > Jesper and XDP gang: this should not regress any performance as > the dma-direct calls are now inlined into the out of line DMA mapping > calls. But if you can verify the performance numbers that would be > greatly appreciated. =46rom a superficial review of the patches, they look okay to me. I don't have time to run a performance benchmark (before I go on vacation). I hoped Bj=C3=B6rn could test/benchmark this(?), given (as mentioned) this also affect XSK / AF_XDP performance. --=20 Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer