Received: by 10.223.176.5 with SMTP id f5csp5894wra; Thu, 8 Feb 2018 15:21:07 -0800 (PST) X-Google-Smtp-Source: AH8x224uLXparGMnfN9xMMmPxLYKmeEork7ymsKyAVWzDZZxMNZeWl1dYSpok+0C/bkY82nnKzO7 X-Received: by 2002:a17:902:7008:: with SMTP id y8-v6mr611456plk.358.1518132067627; Thu, 08 Feb 2018 15:21:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518132067; cv=none; d=google.com; s=arc-20160816; b=CssnYLuw7F2hmWR0HHa0vfeIYeMbpKqzT7mvakq2rPcjOb1zCrAnocXwUaocrKdeqr bRtDGG7LDhT+qx8XwQAeb6nEKC6rocfmMSYvkPz92TdraAFDsAblT9j7WXw7ASZxWKVN LxQ66ctEvyaERa0OdSNNRoFoH/koorSaAQLsTUIZalNatxTs7FREbIGfi3Xn3q3OOzXf eU9DoqoVjnsl87irN4nF58il/ifdANSoI3d+zUvur6shJYG7jTFDRAh/HzPMx/CfpX/Q U5TGnTFchJR2NKQC3DjxZGZ7wjWKtqjxkK6i07kx9ILZJWYLK9jv4X3DjaT7NBnD68E/ 8x/w== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=BZ2+ibz6DX1C9j0WsfKZ3of+3P63HONJLh52t/RYz4c=; b=OP0hsKzS28+341VgL9XuFKiEP/I5PpMk7+U+j90AsSPML5q38FFepQ/AHbFMA3yyDh Yu+LpWd5JqHCdTOtg4Ze3yjuvGhdLiiJDHvbKJExCGHSI4qcCBaNEbgtl5ilZJOgOgSn 5qMRIQvOkt0m3S5SrM/T+LJ/s9qMd2HBnpBlI4sMIuLmYvjhp0mEom0Hp2kAFmFRzTUI e/nc0VggQuS8uBo1fl7B956uJUy5atYXbQKtUu0v2BD9aTCtBR426sv+kdk/Le/QqR/r 9z6ld4+xZ2bQ5r/tRdjrTZH7bwmpuEvxGDDHrTfyuYyrz1Ed+DQZFDPJycbIqOJhkRNH KOjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cj0MlapF; 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 y14si711175pfe.38.2018.02.08.15.20.52; Thu, 08 Feb 2018 15:21:07 -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=bombadil.20170209 header.b=cj0MlapF; 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 S1752193AbeBHXUJ (ORCPT + 99 others); Thu, 8 Feb 2018 18:20:09 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:49029 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751910AbeBHXUI (ORCPT ); Thu, 8 Feb 2018 18:20:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To: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=BZ2+ibz6DX1C9j0WsfKZ3of+3P63HONJLh52t/RYz4c=; b=cj0MlapFICFAq92xsh9uGVwRhS 5xT+BXLA9bnRBCCiDtrpho1f8qI/M6v/MK2ecpSd9Rn3C27GwHAip9Do4psaS/a+kHZOqEy1qBYo2 zqvjTExMu0r2uWlA5ZJtqZHDsMxCp9ItMbYIRl+EYDpiRVff5TGcesb8oQ7RIGcUZsw+rWdI2CN8m nyftT6K6agX1VMw8y68A1kbBe6r+bAQ07DM0VmfSoOKZcL2RiJuDEbY4/2ZWWEkOa+WO9/7n0oFzL 3gWvETuDvuCEB8nY+WNsgc2HnoFWa5xCF2svmj+UvrKlzkDS2yZ30OxebejwCCyT7Q7ugWnj/eaGB lexDrjFA==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1ejvU4-0002F3-Uj; Thu, 08 Feb 2018 23:20:04 +0000 Date: Thu, 8 Feb 2018 15:20:04 -0800 From: Matthew Wilcox To: Kai Heng Feng Cc: Michal Hocko , Laura Abbott , linux-mm@kvack.org, Linux Kernel Mailing List Subject: Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly") Message-ID: <20180208232004.GA21027@bombadil.infradead.org> References: <627DA40A-D0F6-41C1-BB5A-55830FBC9800@canonical.com> <20180208130649.GA15846@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180208130649.GA15846@bombadil.infradead.org> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 08, 2018 at 05:06:49AM -0800, Matthew Wilcox wrote: > On Thu, Feb 08, 2018 at 02:29:57PM +0800, Kai Heng Feng wrote: > > A user with i386 instead of AMD64 machine reports [1] that commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitlyā€¯) causes a regression. > > BUG_ON(PageHighMem(pg)) in drivers/media/common/saa7146/saa7146_core.c always gets triggered after that commit. > > Well, the BUG_ON is wrong. You can absolutely have pages which are both > HighMem and under the 4GB boundary. Only the first 896MB (iirc) are LowMem, > and the next 3GB of pages are available to vmalloc_32(). ... nevertheless, 19809c2da28a does in fact break vmalloc_32 on 32-bit. Look: #if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32) #define GFP_VMALLOC32 GFP_DMA32 | GFP_KERNEL #elif defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA) #define GFP_VMALLOC32 GFP_DMA | GFP_KERNEL #else #define GFP_VMALLOC32 GFP_KERNEL #endif So we pass in GFP_KERNEL to __vmalloc_node, which calls __vmalloc_node_range which calls __vmalloc_area_node, which ORs in __GFP_HIGHMEM. So ... we could enable ZONE_DMA32 on 32-bit architectures. I don't know what side-effects that might have; it's clearly only been tested on 64-bit architectures so far. It might be best to just revert 19809c2da28a and the follow-on 704b862f9efd.