Received: by 10.223.185.116 with SMTP id b49csp7564791wrg; Thu, 1 Mar 2018 07:30:27 -0800 (PST) X-Google-Smtp-Source: AG47ELsZkwVxLGfZScGoW8rOTPWNDaZqDJCzzJPEZvpGtZUpffZ20f+0TTHbZgAXQL4jiVhcLs3e X-Received: by 2002:a17:902:40a:: with SMTP id 10-v6mr2275432ple.245.1519918227702; Thu, 01 Mar 2018 07:30:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519918227; cv=none; d=google.com; s=arc-20160816; b=a1Hf0dsanQ7fqulXFP4pNbYdlw5SQ/kgigXNbc7qNAiYlyzL8EohtRYX8mmus8uAZv l3DnE4xh2xz1gu1RWhFci/zfayFJWYm8MeUfNs0BMQFPTqUrMWbiVRGX1nqIudl8ja+6 JKX8q+2q9woLQFyfj32Y4QsH/in6bXXefC9aKrqOURcBLGoQO5jhGi2SsLflbM0Fx0jp mM5hILi39ygf2gKAjDyz/6qSIuVM4/o4y15gvjkdpMtcVGLXJ8OxIFD6TprxtUVdWyLG aq25zJnev/rkWaHcuvVmlQYuaHsm23CZPs4eBk70aZ2BiYUz2OxNd4iDdB2AtdW0G0xF rCjg== 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=83Lgn/9WlYEvUmIaqMttycgVtffJu+MoKyq5PgBbLkg=; b=M3KAFX6kDoUn+OUMTRJXCUW3cE/efJfXWy6IdK2OaE0gZX0P1nE3rR+7Uc5EKp8mT6 p26cih5Ik8r5lQ8hdmNeVO3fbVdFkhBVz+8dIuqIM1Uq/bZbHo3qhcEhllu0zb8mk4rz 0YI7OmZzA0VB+YIUF4HDrg44r3RYUvzNv8dKn+JjemJNQv5Wasq8omoVlIkBYFXbyAFf sQjP9iFZYCWXtEn82BgAkM7mvZCWLviQRll8/4Db4aGsfq9YZ4OMTVQ7QBs/tRUK8Q6m L1p+gKpcCvY6nKa7Gsh8n3sjo9AjSuV6ohgKKiLajSnuSmWlwWKfkrwpBrSmKYhUVv0R Ch7Q== 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 a61-v6si3175726pla.248.2018.03.01.07.30.12; Thu, 01 Mar 2018 07:30:27 -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; 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 S1032134AbeCAP2v (ORCPT + 99 others); Thu, 1 Mar 2018 10:28:51 -0500 Received: from mx2.suse.de ([195.135.220.15]:40309 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031984AbeCAP1b (ORCPT ); Thu, 1 Mar 2018 10:27:31 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id ED5D1B2BE6; Thu, 1 Mar 2018 15:27:29 +0000 (UTC) Date: Thu, 1 Mar 2018 16:27:29 +0100 From: Michal Hocko To: Daniel Vacek Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Mel Gorman , Pavel Tatashin , Paul Burton , stable@vger.kernel.org Subject: Re: [PATCH] mm/page_alloc: fix memmap_init_zone pageblock alignment Message-ID: <20180301152729.GM15057@dhcp22.suse.cz> References: <1519908465-12328-1-git-send-email-neelx@redhat.com> <20180301131033.GH15057@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.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 01-03-18 16:09:35, Daniel Vacek wrote: [...] > $ grep 7b7ff000 /proc/iomem > 7b7ff000-7b7fffff : System RAM [...] > After commit b92df1de5d28 machine eventually crashes with: > > BUG at mm/page_alloc.c:1913 > > > VM_BUG_ON(page_zone(start_page) != page_zone(end_page)); This is an important information that should be in the changelog. > >From registers and stack I digged start_page points to > ffffe31d01ed8000 (note that this is > page ffffe31d01edffc0 aligned to pageblock) and I can see this in memory dump: > > crash> kmem -p 77fff000 78000000 7b5ff000 7b600000 7b7fe000 7b7ff000 > 7b800000 7ffff000 80000000 > PAGE PHYSICAL MAPPING INDEX CNT FLAGS > ffffe31d01e00000 78000000 0 0 0 0 > ffffe31d01ed7fc0 7b5ff000 0 0 0 0 > ffffe31d01ed8000 7b600000 0 0 0 0 <<<< note Are those ranges covered by the System RAM as well? > that nodeid and zonenr are encoded in top bits of page flags which are > not initialized here, hence the crash :-( > ffffe31d01edff80 7b7fe000 0 0 0 0 > ffffe31d01edffc0 7b7ff000 0 0 1 1fffff00000000 > ffffe31d01ee0000 7b800000 0 0 1 1fffff00000000 > ffffe31d01ffffc0 7ffff000 0 0 1 1fffff00000000 It is still not clear why not to do the alignment in memblock_next_valid_pfn rahter than its caller. -- Michal Hocko SUSE Labs