Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1091620pxa; Wed, 5 Aug 2020 22:25:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8ki0DwU3cx/DTr55MiLmuA5qsJQpq6mqGmzvKHYat9wUuI0hzhUKizIw99ZA3gprv++m4 X-Received: by 2002:a17:906:3911:: with SMTP id f17mr2825929eje.56.1596691506062; Wed, 05 Aug 2020 22:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596691506; cv=none; d=google.com; s=arc-20160816; b=eGYQ5enkQFrCC6A+qRKJfTwdX5ug0BZMr138LdDD0xhWL0v37QVIsg5rbzbzcaYHnM 5sUf6JwUu4BWFHNOo430guIz6dKF37rOiC6oP7hBP+oXdYvQJwEwFvVuiLDyN6gBFsl3 QwhNusUqMdJLFoS2OSyCMXHURMiNH92e0DYwZnwlg2EFlNllIKc/ripo9dUeahhboFLF rk5pTRSeYRZgpijG+YI052/pVJVQhH2eM6LKRQ+EO0JCPJH4p/40vFvqj3HMX860tzWB vfCANGEXcCXBuDkbi7ayxpyxwRPpwpss4ZVcOyN3o2JO/55pVZQeWIcauT/x/Ke7K2Xs j0pA== 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; bh=AyD+HgAiI/8atPicYhby5Fs7Lp5xpyFrAE59W2DLqGE=; b=tV2ga2bM/JGdt+4+FsAH+Orn8HEswzOBMqG2E+hroR6uv/hmpGbave6uL+73owtpbZ hPkKtWIYy1ilJKnag+xm6D+7SWca6Tzjp4zn8Gm0WRyAqtczQJjcwLyqbUtBJSdria3s Nb6TJpbu29Sr7qXzVbgY19R/LzLCMlsGK9j9WOhfQe/umjY0rnonTbzpaWGdn6zjD4Hz MILYiF0sTbddi1RNe/tKXNy4Iq/xZZNH4hB9JJy8tujGdttoOnCtEDfl0WsY2n1iEIj7 pinHa2XTDQgAxx3Te7VpPk5vAnAIulOlvX/7ts6/QDukEY7LtRorgYhg4GOt51E+Z/8Z MBWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pv15si2617748ejb.596.2020.08.05.22.24.30; Wed, 05 Aug 2020 22:25:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726490AbgHFFSS (ORCPT + 99 others); Thu, 6 Aug 2020 01:18:18 -0400 Received: from verein.lst.de ([213.95.11.211]:48641 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725440AbgHFFSR (ORCPT ); Thu, 6 Aug 2020 01:18:17 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id AB10868CFE; Thu, 6 Aug 2020 07:18:14 +0200 (CEST) Date: Thu, 6 Aug 2020 07:18:14 +0200 From: Christoph Hellwig To: Nicolas Saenz Julienne Cc: Christoph Hellwig , amit.pundir@linaro.org, linux-kernel@vger.kernel.org, Marek Szyprowski , Robin Murphy , rientjes@google.com, jeremy.linton@arm.com, linux-rpi-kernel@lists.infradead.org, iommu@lists.linux-foundation.org Subject: Re: [PATCH v2 2/2] dma-pool: Only allocate from CMA when in same memory zone Message-ID: <20200806051814.GA10143@lst.de> References: <20200803160956.19235-1-nsaenzjulienne@suse.de> <20200803160956.19235-3-nsaenzjulienne@suse.de> <20200804060633.GA7368@lst.de> 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 Tue, Aug 04, 2020 at 11:43:15AM +0200, Nicolas Saenz Julienne wrote: > > Second I don't see the need (and actually some harm) in preventing GFP_KERNEL > > allocations from dipping into lower CMA areas - something that we did support > > before 5.8 with the single pool. > > My thinking is the least we pressure CMA the better, it's generally scarse, and > it'll not grow as the atomic pools grow. As far as harm is concerned, we now > check addresses for correctness, so we shouldn't run into problems. > > There is a potential case for architectures defining a default CMA but not > defining DMA zones where this could be problematic. But isn't that just plain > abusing CMA? If you need low memory allocations, you should be defining DMA > zones. The latter is pretty much what I expect, as we only support the default and per-device DMA CMAs.