Received: by 10.192.165.148 with SMTP id m20csp1801022imm; Thu, 26 Apr 2018 02:25:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx48SX47oyPenj1C7TQ6KTHx9fhGJx1T1jcbJYe5SjUFm80RWFRJqCSY8TkHGSnPwYs6s5jnY X-Received: by 2002:a17:902:294a:: with SMTP id g68-v6mr29602417plb.110.1524734744348; Thu, 26 Apr 2018 02:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524734744; cv=none; d=google.com; s=arc-20160816; b=I60dUZxt6KPlvoDFoglA8CXmKLzZ79UOTC1WY3RJ5reaPl1xVwFEWwGCm5WsuuRL5X /ynOPUW5i6/8cvLFAY6hEXZOWA5L1sV7k+4yyd0FgnqHHR9TeGQWk/WXPGUH6GTyhPGx MWgvzna73Dp5Az3sZC87QUbJQzyYIDY8ukkvujYADMxBqPu1K+j59SgTgx6MpmVZvaVS j8Yec2rA8TscjmuCRhdnHPOFN9xQUS9A6mrlL7YVI8m+HoinaDd3X2P0xnMEptbgbcTG qwT6GT1MUYcfJVIsRO1kv0t/qLNTefFchFATtxuCt8qoauvLNgpoWc3PaKdvq9Qt7Kpl 7iMw== 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:arc-authentication-results; bh=lh1PRyCt53l54iuXyPVLsBpA9oSDdXqGbj2ilxeFamA=; b=ly9YBdumWw3DNOExjYYeFUN1azknsswjFPEVg/jm5Hg/m9kBuDjTXrtwPcyJ07Bs/2 EshkzGkreXfXOYNOD9mI4JVSlHYlC12TQhM0cA+w5VWoh35s/ibCdXzBBhcRjeaweAmv drmGOFZT1uLDaXLzBVa8fX+cRKSoub0pLqmyroIVaB9tvWvqfSLyrMMYHfFNhwCQPZ5A TcHYeBIpiwosV1ZpebrpeAVAfmE7HssngVLYB2FV5oQm9jVP4PWEtT5CxQRuArDlyClk 27uvkRy3GhJtLjBkvBYfuQVXy+/RZpGEpnk/ovfu2dVNfseGK0uzr7RQX/pePu4U/sTK w3eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XqVHrX+M; 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 w3-v6si17566350plb.17.2018.04.26.02.25.29; Thu, 26 Apr 2018 02:25:44 -0700 (PDT) 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=XqVHrX+M; 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 S1754277AbeDZJY0 (ORCPT + 99 others); Thu, 26 Apr 2018 05:24:26 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58940 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753403AbeDZJYY (ORCPT ); Thu, 26 Apr 2018 05:24:24 -0400 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=lh1PRyCt53l54iuXyPVLsBpA9oSDdXqGbj2ilxeFamA=; b=XqVHrX+MjPhUuQqjC7sAX6F/W ii3pLyV10hCAGFWzBPbGdX4Hl3vDBFHxZTQu7z1sq7JJW2CbenrgJCy8SZ57YZKJSbQulcmffV5KU j9a+B3TAOtPmASNVzgtK0MhtEAZNDFHD+amQeR6v7uuFyBZ7XkMfiUoyS14kW8wR682v3QbUKgwdX Lak+7DUj7vDDJD7a7HvlyrS154gs87nHKH8IOztm6GCtiHmjZGo1aEmMRO+Ev/F0iJ+qjQrwQutM9 VPbEAehfSuImaqOMg4PrganSEsesnj1gpKTGgYEgZGInltdsXHeL62KLGhZO//Ne+tvgHseDHTO1Q qAdf2BnFQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fBd8Y-0007Su-PI; Thu, 26 Apr 2018 09:24:22 +0000 Date: Thu, 26 Apr 2018 02:24:22 -0700 From: Christoph Hellwig To: Daniel Vetter Cc: Russell King - ARM Linux , Christoph Hellwig , Linux Kernel Mailing List , amd-gfx list , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Jerome Glisse , iommu@lists.linux-foundation.org, dri-devel , Dan Williams , Thierry Reding , Logan Gunthorpe , Christian =?iso-8859-1?Q?K=F6nig?= , Linux ARM , "open list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: [Linaro-mm-sig] noveau vs arm dma ops Message-ID: <20180426092422.GA26825@infradead.org> References: <20180425054855.GA17038@infradead.org> <20180425064335.GB28100@infradead.org> <20180425074151.GA2271@ulmo> <20180425085439.GA29996@infradead.org> <20180425100429.GR25142@phenom.ffwll.local> <20180425153312.GD27076@infradead.org> <20180425225443.GQ16141@n2100.armlinux.org.uk> 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 Thu, Apr 26, 2018 at 11:20:44AM +0200, Daniel Vetter wrote: > The above is already what we're implementing in i915, at least > conceptually (it all boils down to clflush instructions because those > both invalidate and flush). The clwb instruction that just writes back dirty cache lines might be very interesting for the x86 non-coherent dma case. A lot of architectures use their equivalent to prepare to to device transfers. > One architectural guarantee we're exploiting is that prefetched (and > hence non-dirty) cachelines will never get written back, but dropped > instead. And to make this work you'll need exactly this guarantee.