Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6677723imu; Mon, 21 Jan 2019 13:31:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN7powHTq9Nsyld/L6yRi9xcJljjw/d0DV8qUlP4cG/SHw76wsfoBooaPLMOQcLMg6rTRniQ X-Received: by 2002:a63:1c09:: with SMTP id c9mr29188528pgc.200.1548106272138; Mon, 21 Jan 2019 13:31:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548106272; cv=none; d=google.com; s=arc-20160816; b=qr6oeQ/IUryOSrNa8rPdusdH2qnxdqa6S666xnXtjzAKjdmQZOlEyzMG4/vJVziPbw 0S9Gej6xyW0io4dFPKn316WyuOnABC/oI3zb6e0FeJqoo6GDQxdNCHnAsvGLOTT3jHVD CE2SJYSuFjJ7NFTaPYFwMPgjldXdyhyUvlLIeNpWhaoOsT0Dl6+4ICZxUppfp0EHsKBW YDeC7QFJ2m75Iy4vdp8jOVjBb5hhbha+srr5Lnh8sfDHNO3/QqkNyH1ie0At5zcZBBAG zHT8l02FaeZgEdrozlbjqPRXN73gjVSC3ue5YW99G1mtwh4gNmr0M//3kKQjoMvJhu/v Md7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9iIaPQrmUoxImEoqMmApMU/TQ6QplGJaZRBlEZeaw1w=; b=HJ+Gc3oSk+dqgEHbuN1grTnSBiovEAZ40vK8IK00FktBPDiqENM2u98wAGkmwaDbmU sIuBTWlCC5bxXiW2RCqzrgxPQGf6mzHj5+cqm20ANyvfQzWCxYLED+xxwz7Hogj6rqjU fcIkSIt7c12ZEVi64EVGAeSLOiDAjbu34dPU5h3eVopt89zcukCeW9ECXiTc0o+P8gSd lWi4W5BQ9T1EoDhuAr49ykdRQT+Lk9g6VkLs1BqmmPnJ/KVbBnd+CjeIPVCiwKq1b4Nw Y49w1LSLF95eM0NmQFCXWcYY3Q8+dwoxHX4arIIWxpC5McTw7pa+/4hSJVPEM8DzIajx 5jpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SyFvu6eT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r25si2628902pfk.28.2019.01.21.13.30.56; Mon, 21 Jan 2019 13:31:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SyFvu6eT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727747AbfAUV3v (ORCPT + 99 others); Mon, 21 Jan 2019 16:29:51 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:55128 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727422AbfAUV3v (ORCPT ); Mon, 21 Jan 2019 16:29:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9iIaPQrmUoxImEoqMmApMU/TQ6QplGJaZRBlEZeaw1w=; b=SyFvu6eTFI7hrB2JROBDfean3 /qfWXZFG/pQJrOObQr8Mf4HsLPMOqO26YjxB0kjWE+Nw4u2EwC/oqZU7HvtLjcNmXVFsGSqu70c2q HGDDdLAORY80a5uz9TimVUYwWtkyU4hoBRG0SI9J0DiC78p1P49KZMZvLGix7BcDwYoNQhxQR+2qP Q9oGTGwXbNiFSJIAoGjrvclcGkrODPIObiBKgy40Fgr3nBhKXGd1rVooJNtfG/hLcawW+911JcVWV dBHxFJxKEtKP3DsZNEe5r94uGKGFL1fF5XiBPhz28dy1pJR+gYa9yt359BIV/dd3twYqZEnrsmJU8 cLw4yoyDA==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1glh8d-0007Si-I2; Mon, 21 Jan 2019 21:29:47 +0000 Date: Mon, 21 Jan 2019 13:29:47 -0800 From: Christoph Hellwig To: Liam Mark Cc: Christoph Hellwig , Laura Abbott , sumit.semwal@linaro.org, arve@android.com, tkjos@android.com, maco@android.com, joel@joelfernandes.org, christian@brauner.io, devel@driverdev.osuosl.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org, afd@ti.com, john.stultz@linaro.org Subject: Re: [PATCH 3/4] dma-buf: add support for mapping with dma mapping attributes Message-ID: <20190121212947.GA28620@infradead.org> References: <1547836667-13695-1-git-send-email-lmark@codeaurora.org> <1547836667-13695-4-git-send-email-lmark@codeaurora.org> <20190119102527.GA17723@infradead.org> <7ae73c39-9049-bcf6-775f-b0817ba0ec5f@redhat.com> <20190121083046.GD12420@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 21, 2019 at 11:44:10AM -0800, Liam Mark wrote: > The main use case is for allowing clients to pass in > DMA_ATTR_SKIP_CPU_SYNC in order to skip the default cache maintenance > which happens in dma_buf_map_attachment and dma_buf_unmap_attachment. In > ION the buffers aren't usually accessed from the CPU so this allows > clients to often avoid doing unnecessary cache maintenance. This can't work. The cpu can still easily speculate into this area. Moreover in general these operations should be cheap if the addresses aren't cached.