Received: by 10.192.165.148 with SMTP id m20csp905148imm; Fri, 27 Apr 2018 09:20:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZonFEQbWWck8DKGpy8Wm/hCmzQZ81ryG74O5Ifx3hUFiY+Yw6kx6MNG2Z+HPF2K11JMW7OZ X-Received: by 2002:a63:7154:: with SMTP id b20-v6mr2707110pgn.426.1524846023853; Fri, 27 Apr 2018 09:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524846023; cv=none; d=google.com; s=arc-20160816; b=LAP6d6/GhhyRGLmtXpthq4V6o1TUoN7orgfVyxbnX9igA6i1Icd9eit/0UtzlnUIzc 4U5LzAbpbJlIek6nge5A/zADPEPpU2EpxowtzrVcYNEUP9TcnwQ0Tjk0BxUjcJ2HG+3r Xjfjz7RDijPj8Q5GQ8xoVRLsdUHgcDmudkjgGh/eq7oiDbsYeCoFqTnru+QVfrzEX9ha AS/MZ3+mlIT7zYxsRaw6/Isguas4Jn2ZtdKf/dYkjnieCR8ar9QdyZHKfzFHVZ46i246 f9EqtOnoaMCzqgEdERiRAG5m/aoLALJfKUhY+L6xcfiznPr/u/pehMmMtPFmld6/530x reiA== 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=SxLhVGsShDtEbypRoVq51ft9SqctxoytVAOKmA2mqjw=; b=vJLygwFGXUkmyloOt6XY4rkAhpWS93TVvu2n0CLQEn5oQJq2r/FVItJQr9OhSarios Pfe//tPMHGnopNejG8/QzNoTfeJNew0fFHZ5HQnKWX8QncDjh4nulTmk3plWUbRyTdNn jXIlJcewm31mq5l2hfq5rsFPN2rl0mpKWRUCKrKcUct53Dt67x2zOrIWi5q+lmiQHaEa jKDGZjmd4J9tnJmaZuonwV0hyD1XdUvSds825LnEvlvFmwwap6ucglhrjjagS1lJqzam vBXAWQRjhcrqbiBFH3VxBHM4Rccnd8Ord8ly3rwAqY6k1xFlN+VQ9Z5HPKsgWIXxxRKT /pPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=MlQxCVX/; 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 v12-v6si1598337plg.180.2018.04.27.09.20.08; Fri, 27 Apr 2018 09:20:23 -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=MlQxCVX/; 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 S1758479AbeD0QSS (ORCPT + 99 others); Fri, 27 Apr 2018 12:18:18 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:33108 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757513AbeD0QSR (ORCPT ); Fri, 27 Apr 2018 12:18:17 -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=SxLhVGsShDtEbypRoVq51ft9SqctxoytVAOKmA2mqjw=; b=MlQxCVX/7OjqBndKSPdm+mJwe QfgfWGQC0s1gLDLv3LrhHnv7jEexW7teM9dDO+7vIhzGM3yNuk1d8AgiQk1oh3LDYXSfQBJWno2MX f9vnzeoP5/gDB/Mey6W9cQLbk6D/89o27O+k7IcJ4jq74E2hx6J0AidkQUqrpSRVxee7cxRxd2GRY eJJACtZKRSCn2CxXZ7s4bUJoBnDMYbuAgzZFJQukTd4ep05vbiAuDhfKX+toY8wKoNLTnLkY1ZcSA 5NKOQBFLMHfH0Ku0pcG9v3NwvvhubTaL3fporOCfYB4T11tmspHiiTI+rQqQ52itM/GMlO0m/A+YK xh78AxIhw==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fC64b-0004ZD-Ji; Fri, 27 Apr 2018 16:18:13 +0000 Date: Fri, 27 Apr 2018 09:18:13 -0700 From: Matthew Wilcox To: Christopher Lameter Cc: Michal Hocko , Christoph Hellwig , "Luis R. Rodriguez" , linux-mm@kvack.org, Jan Kara , matthew@wil.cx, x86@kernel.org, luto@amacapital.net, martin.petersen@oracle.com, jthumshirn@suse.de, broonie@kernel.org, linux-spi@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, "lsf-pc@lists.linux-foundation.org" Subject: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love Message-ID: <20180427161813.GD8161@bombadil.infradead.org> References: <20180426215406.GB27853@wotan.suse.de> <20180427053556.GB11339@infradead.org> <20180427071843.GB17484@dhcp22.suse.cz> 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 27, 2018 at 11:07:07AM -0500, Christopher Lameter wrote: > Well it looks like what we are using it for is to force allocation from > low physical memory if we fail to obtain proper memory through a normal > channel. The use of ZONE_DMA is only there for emergency purposes. > I think we could subsitute ZONE_DMA32 on x87 without a problem. > > Which means that ZONE_DMA has no purpose anymore. > > Can we make ZONE_DMA on x86 refer to the low 32 bit physical addresses > instead and remove ZONE_DMA32? > > That would actually improve the fallback because you have more memory for > the old devices. Some devices have incredibly bogus hardware like 28 bit addressing or 39 bit addressing. We don't have a good way to allocate memory by physical address other than than saying "GFP_DMA for anything less than 32, GFP_DMA32 (or GFP_KERNEL on 32-bit) for anything less than 64 bit". Even CMA doesn't have a "cma_alloc_phys()". Maybe that's the right place to put such an allocation API.