Received: by 10.223.185.116 with SMTP id b49csp1594713wrg; Sun, 11 Feb 2018 16:11:55 -0800 (PST) X-Google-Smtp-Source: AH8x225bnN0OPmDgTPiPy0alFWM9YznF5NodUPbH6bJgcVaYLb0+MQ4m/Yy3WN7vTAfDnRYm1hQy X-Received: by 10.98.160.80 with SMTP id r77mr9910845pfe.231.1518394315557; Sun, 11 Feb 2018 16:11:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518394315; cv=none; d=google.com; s=arc-20160816; b=hoOgKeXayN4HnXNpITPz9in//yTwWGuWMtfS8emp56v9Iq03OPciBdEwDiLS6ls39D lFVf/4v6usQO1xFoufcqGh1C6YVZrddt79P0o2KQITo/Cf3jN8xgxRgH2u7Iph7I/XDq pz8eGNfeAhK1sSjt8K6QaSW8sbFUCWU1lZJKE1nMRJ/yQCl+iV8uXwZx/tXZNWuFNial EpfSjo6xJ90F5MsbPHA7R/uZjdravZEkF3+dEYyfSx++uJp7pYzj5eCG2+ZA46RKopQU cz7hVanVzfTHVjmW46SgQ/BMscPAQAfuC0QLFgVzUDEoI78nDINmqIEk1A/U9APPSIiK 4WZA== 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:dkim-signature :arc-authentication-results; bh=Bu6a9RSAlVjBX60lP+J8iV7UQQB8eGNlSSBooLUrDmI=; b=sFuBfiWZ7A6DV9A2Iqe4VLt7EqBjPLK1tUCxyrin9NXHon2hXG/zB85z3ITgLOoNde HOoJuoupMNLdf+OG6me+Ls+eKXqNOFkYqphAiZWJsgKde9u1pHNs7BP7wmUh5+TGYqNI idMqXzl7nmbJrDgFLfRDu8Dy1rB9fic6G41JLjeyHzjmqzMlnUy8fUXfwG78BG1rb2jZ 6ZejRf0LXu9r+rcW4BVuKqwjQFaxfQybPbM2uijeK3HPA4mH4JbAwL2neexzX3ejhPjf IVtQ80/ADvQ/Q2H10Q4EuxFdsEYl0XhUxH5aiUq/VrU7eY0V+AwU5SbnR2MJ8aSJgrpz O5DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Zezwmgfr; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=axH1UiSb; 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 e63-v6si5094626plb.305.2018.02.11.16.11.41; Sun, 11 Feb 2018 16:11:55 -0800 (PST) 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=casper.20170209 header.b=Zezwmgfr; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=axH1UiSb; 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 S932282AbeBLALC (ORCPT + 99 others); Sun, 11 Feb 2018 19:11:02 -0500 Received: from casper.infradead.org ([85.118.1.10]:59540 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932244AbeBLALA (ORCPT ); Sun, 11 Feb 2018 19:11:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=Bu6a9RSAlVjBX60lP+J8iV7UQQB8eGNlSSBooLUrDmI=; b=ZezwmgfrvmetjDK6EbW1Ou+bz +C3oLgCp7yVRBFd4EYbruJcG/igxrxUXgZnKFsfb3qwSgTuCgPfnoBasnHQ3qacL4Im8YqIv08ZOH SDyvlArpCLGezT3WYcWTYUHzw2iISj3V+ae6843i/Gwtk03NrPFeZPb8bVZ/4vYLfrV6dtkf8bGd7 tOTeSlPXdJ1l4vOZMEGcPZ4kQt6rSvYiTLkBIqtwSs0jEn/iL0p4h8JWSa9EUhKmWGFMde6OAKf3H qmbmXDcBZrW8883odnt7YqNxFJ3rVLXxXHL0jebCes9MZuaw/pgdo7vKaN9D7/QgJhQks4I0rGynp Wjaps8cuA==; Received: from [198.137.202.133] (helo=bombadil.infradead.org) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1el1hX-0007U2-80; Mon, 12 Feb 2018 00:10:34 +0000 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=Bu6a9RSAlVjBX60lP+J8iV7UQQB8eGNlSSBooLUrDmI=; b=axH1UiSbUTFdrBuuR0UQOs8nA tICMtx9PHwrLFuB7RnyzHFUMHxPi5jfu9X4Q8ulBkYOTTXM+7nDEPGTJxbzAzKqGgpp2nPnFUN6b3 0A8MDI1blSFSeSOf6grio9Dd5KGw+/mXofI8E2VFrGS+XBP8L2muS+t+Ucao4k3iVZw+6fycgZgaf W7OWe+jEEq0A0riLM2Y2SOPbQBT0uR7iBSpmqbrzCIulCjr1xfGvR22+C48E8u08wzeJ0eTGIq1S4 RpELh8qXjTZgl5Z9Ef5EjVHGxr/FMKJwoPrvfWaP0ssSTZ30OzMtz5q7+EPUMyC7nCU29/FfFT4rD q+mz7xjQQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1el1Om-0001a5-3V; Sun, 11 Feb 2018 23:51:08 +0000 Date: Sun, 11 Feb 2018 15:51:07 -0800 From: Matthew Wilcox To: Michal Hocko Cc: Kai Heng Feng , Laura Abbott , linux-mm@kvack.org, Linux Kernel Mailing List , linux-arch@vger.kernel.org, James.Bottomley@HansenPartnership.com, davem@redhat.com Subject: Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly") Message-ID: <20180211235107.GE4680@bombadil.infradead.org> References: <627DA40A-D0F6-41C1-BB5A-55830FBC9800@canonical.com> <20180208130649.GA15846@bombadil.infradead.org> <20180208232004.GA21027@bombadil.infradead.org> <20180211092652.GV21609@dhcp22.suse.cz> <20180211112808.GA4551@bombadil.infradead.org> <20180211120515.GB4551@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180211120515.GB4551@bombadil.infradead.org> 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 Sun, Feb 11, 2018 at 04:05:15AM -0800, Matthew Wilcox wrote: > On Sun, Feb 11, 2018 at 03:28:08AM -0800, Matthew Wilcox wrote: > > Now, longer-term, perhaps we should do the following: > > > > #ifdef CONFIG_ZONE_DMA32 > > #define OPT_ZONE_DMA32 ZONE_DMA32 > > #elif defined(CONFIG_64BIT) > > #define OPT_ZONE_DMA OPT_ZONE_DMA > > #else > > #define OPT_ZONE_DMA32 ZONE_NORMAL > > #endif > > For consistent / coherent memory, we have an allocation function. > But we don't have an allocation function for streaming memory, which is > what these drivers want. They also flush the DMA memory and then access > the memory through a different virtual mapping, which I'm not sure is > going to work well on virtually-indexed caches like SPARC and PA-RISC > (maybe not MIPS either?) Perhaps I (and a number of other people ...) have misunderstood the semantics of GFP_DMA32. Perhaps GFP_DMA32 is not "allocate memory below 4GB", perhaps it's "allocate memory which can be mapped below 4GB". Machines with an IOMMU can use ZONE_NORMAL. Machines with no IOMMU can choose to allocate memory with a physical address below 4GB. After all, it has 'DMA' right there in the name. If someone's relying on it to allocate physical memory below 4GB, they're arguably misusing it.