Received: by 10.192.165.148 with SMTP id m20csp1816373imm; Thu, 26 Apr 2018 02:41:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZocjkjojWQT/OOmyOeaoLYGZuTYyxvz4i/rhtLY9ITTh6osZa+crgAP1MENoFfdZdeybucd X-Received: by 10.99.104.66 with SMTP id d63mr8874969pgc.304.1524735709250; Thu, 26 Apr 2018 02:41:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524735709; cv=none; d=google.com; s=arc-20160816; b=zRYrypoMqc+L0qLHIG9lrmhM8Uim/dWkfz5BDw8rzwId+0pXyngQUPSenqU04wbcWf AqfO5hGzmiYdd71ONJkp9gel3LEMlaclVPp2s0QetduZAbAY9e1n9zveKM31CFusWeFa tWBgFwUPHJrJbs5DDSHxca0Sa5qNKSDa818JxkeqoBXRQ5AD/JWd1x0R6cIbLIenyTfp 835nHxgfl3U6Hjn3B+xsxRJPG7gYJQ0G0hIpwm+9O2L3FHKfRG/H8mw7YIpZYfDXNe2U 5F8dpkG7efCAlRieQ1wg2lltfzdipqq+3vjHT0PxYMC3XvLkh0NX/IgINVrRU9zFCrRR EwmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=0HYLm9PH7NHUEAkKQzNxT13bWHRmSHTsyeyAd7gA9Nk=; b=zC3hVlsNxFwiJVw9Y/odyDr2SMGj6ikgN3+jfD+4133shr6E4sosWADaZ6socp3QDR Fl7HRISaOIyxaDNQ7a1oaRiyWugX1KH4oIAHdudrwloo1E/PqWsxa0BIZ7K1yjC8IOJv ZKPxMsIpFGg7GJJEhC5hlDF0uzPYB3hjIPC2Ekt1w1Ai5eCn5siB0w+lqohfPef3IE85 y3l1Pq35MWQwzWWQirP0t9OfIR2jxDYmSYRo+1ekW7N8uaWNqYzS3uc/lgS47j5JVbxd gvlplN+GhOpa1x2FoErSzmc9cYYMAOyK+3E/m6/c4d2Zls9Pf88yjkSud7a+h2WNqbg2 9IKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=MZk6uqZa; 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 t29si15985920pgo.539.2018.04.26.02.41.35; Thu, 26 Apr 2018 02:41:49 -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=pass header.i=@ffwll.ch header.s=google header.b=MZk6uqZa; 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 S1754172AbeDZJjN (ORCPT + 99 others); Thu, 26 Apr 2018 05:39:13 -0400 Received: from mail-io0-f175.google.com ([209.85.223.175]:37274 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753403AbeDZJjK (ORCPT ); Thu, 26 Apr 2018 05:39:10 -0400 Received: by mail-io0-f175.google.com with SMTP id e20-v6so603440iof.4 for ; Thu, 26 Apr 2018 02:39:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0HYLm9PH7NHUEAkKQzNxT13bWHRmSHTsyeyAd7gA9Nk=; b=MZk6uqZaQJKfSBcSKY0NKzEzK4Q127cKG1juWfrUOC/WVrgRhWMjNam5qQC/K5BiDQ cAqdcJy6iH+uCx1upScuK1OftwClySNJKUJwLNsgPe4AD+tD31p9Il8zi3dwjKsG9ali R7zOdb8nKcHQ8JKhvRRQm+9VvoHfIcRiG10Jg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0HYLm9PH7NHUEAkKQzNxT13bWHRmSHTsyeyAd7gA9Nk=; b=bj88Q9sF0M+xwI0atZgcjde12zDdQGSofgNESEbZPvdcgbb65ykZ5o/8xem/kGIm+r /r6U2CnB0ZG10xpSgwI83W7cTzba5KfjuCkFX4mDnpnwPMBTFYheLRDUZhzmB94oMIDb gtZsSc9gb2LFqEnnrPRx8J5enNYBNBeHPDO61S7uZXVAQUYNDgNFSmenDPCMJdYXJFpE 6xyOrC9WxE0Mcg21HBTxW0mgd6c49naozbOxnBrBF4uxnVIPFXzHWHXTp8iif1SMuapp 8lJKJBnSnGwaIajsZN2RpJPKdSZwPzuabCq2gKk9GGchUsz9DWrEa92Aj1qsGTpybnx+ exqg== X-Gm-Message-State: ALQs6tAne6FWz94U7BmvxZvq/4+n/mnIdovueww2Dexz9RexOZHS1suz +nTOTbBNr0TsDqIVY/eR1xThG0mtXu/v8DqlEOM0gg== X-Received: by 2002:a6b:a4cb:: with SMTP id d72-v6mr12854876ioj.34.1524735550147; Thu, 26 Apr 2018 02:39:10 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:f0d3:0:0:0:0:0 with HTTP; Thu, 26 Apr 2018 02:39:09 -0700 (PDT) X-Originating-IP: [2a02:168:5635:0:39d2:f87e:2033:9f6] In-Reply-To: <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> <20180426092422.GA26825@infradead.org> From: Daniel Vetter Date: Thu, 26 Apr 2018 11:39:09 +0200 Message-ID: Subject: Re: [Linaro-mm-sig] noveau vs arm dma ops To: Christoph Hellwig Cc: Russell King - ARM Linux , 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 , =?UTF-8?Q?Christian_K=C3=B6nig?= , Linux ARM , "open list:DMA BUFFER SHARING FRAMEWORK" Content-Type: text/plain; charset="UTF-8" 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:24 AM, Christoph Hellwig wrote: > 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. Iirc didn't help for i915 use-cases much. Either data gets streamed between cpu and gpu, and then keeping the clean cacheline around doesn't buy you anything. In other cases we need to flush because the gpu really wants to use non-snooped transactions (faster/lower latency/less power required for display because you can shut down the caches), and then there's also no benefit with keeping the cacheline around (no one will ever need it again). I think clwb is more for persistent memory and stuff like that, not so much for gpus. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch