Received: by 10.192.165.148 with SMTP id m20csp584747imm; Wed, 2 May 2018 05:40:02 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqcnwtsjBK0oAN3K4Qi+F0kYc3IfJwoxeooxZ8I4vS1DvjP77KTsglu6w+J5pHXcVHyQuZa X-Received: by 2002:a17:902:74c9:: with SMTP id f9-v6mr20324303plt.385.1525264801985; Wed, 02 May 2018 05:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525264801; cv=none; d=google.com; s=arc-20160816; b=rS81sOoGXkUlAKH0UqfsMZta5fqtlHdJvbheyvHkMAT1S7/02GnM88Ejh+Kkai+Zx8 zOYkwXVit3p3diYdXSFkzI+7DDPR0Jj4dpVvN6WpZnot/mMaC25/cU5guGfB3poWYHYH kofUPzFg8z1vXcHZC3L/u7uWXHH9qUZManmJUjogiB4MkB7jalgUYFgzlQm+YpaiF9rI Z8kpsMNzpkw4l1ZKkzUTJlbGw+BrBUziOk6z5izMwjjM4MiZeW8i6OCHKD7QDDmWHnwh Us0BdngwJGjuL6PWe3jinqxEyw/9p+0lThPqu2YBsK67bm3QHAfKkJ7V863sgVMxE6dn yp3Q== 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:arc-authentication-results; bh=DS8Ouc+0q+IcxmrT128a0+y1XTrRbAufBQo74EiskVM=; b=gLiTGHxI1Trm5CSpqMCmFfA6Ea9W2eiVY6QdIM/8bPrXlM5rqYFPvhSHl3TTLff0r7 w8UZwF4PCMHRwGmyFPcmpwYAlup836cbWxlLKHEdNw4prmWqv/8HHGEC8raThjr7wNUM 1cYZabhndSjRu8FreIoQZRwCdBdlK5+iLB+ScST7gjKFCIRLPS8dLmJwE2kjz/zLCQRS wRYsw5o6wQhygwJ1t//o8RatOAbKghaEja9AZInKmvLlKqDj4JI9+X9vf6+qtXWMOVjk UcnSLgILy6+dQAOOSmGsi0yp+yvWUPpFupSNgauNSD9cqR4X0dcaUCh11CskM41oLxwU EyRA== ARC-Authentication-Results: i=1; mx.google.com; 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 bb5-v6si7381520plb.355.2018.05.02.05.39.46; Wed, 02 May 2018 05:40:01 -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; 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 S1751420AbeEBMjT (ORCPT + 99 others); Wed, 2 May 2018 08:39:19 -0400 Received: from verein.lst.de ([213.95.11.211]:38997 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751020AbeEBMjR (ORCPT ); Wed, 2 May 2018 08:39:17 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 0ECE968D38; Wed, 2 May 2018 14:41:51 +0200 (CEST) Date: Wed, 2 May 2018 14:41:51 +0200 From: Christoph Hellwig To: Daniel Vetter Cc: Christian =?iso-8859-1?Q?K=F6nig?= , Chris Wilson , Michel =?iso-8859-1?Q?D=E4nzer?= , Konrad Rzeszutek Wilk , Christoph Hellwig , iommu@lists.linux-foundation.org, Linux Kernel Mailing List , dri-devel Subject: Re: [PATCH] swiotlb: Fix inversed DMA_ATTR_NO_WARN test Message-ID: <20180502124151.GA22857@lst.de> References: <20180501132411.2311-1-michel@daenzer.net> <786ca83f-45c4-264b-2aef-d84fb18d3d28@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 02, 2018 at 02:18:56PM +0200, Daniel Vetter wrote: > Other dma-api backends like cma just shut up when __GFP_NOWARN is > passed. And afaiui Christoph Hellwig has plans to nuke the DMA_ATTR > stuff (or at least clean it up) - should we just remove > DMA_ATTR_NO_WARN and instead only look at __GFP_NOWARN? No. __GFP_NOWARN (and gfp_t flags in general) are the wrong interface for dma allocations and just cause problems. I actually plan to get rid of the gfp_t argument in dma_alloc_attrs sooner, and only allow either GFP_KERNEL or GFP_DMA passed in dma_alloc_coherent. > Or maybe we should at least enforce that both or none are set, for > consistency for now? The interface should be DMA_ATTR_NO_WARN. __GFP_NOWARN in this context was never documented, and just slipped in.