Received: by 10.223.185.116 with SMTP id b49csp7690332wrg; Thu, 1 Mar 2018 09:26:00 -0800 (PST) X-Google-Smtp-Source: AG47ELt8oFLWqcVDBNZm8oXXIvaXqkUsNspORhlbfIiU6cTQscTjLjPGWA04+By8AnVZgPYBoqLA X-Received: by 2002:a17:902:8a94:: with SMTP id p20-v6mr2607074plo.74.1519925159895; Thu, 01 Mar 2018 09:25:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519925159; cv=none; d=google.com; s=arc-20160816; b=r982THR0SmV8BE5Gq8glKgTjt4jR0nwOXJN2DT0aO0YfzGT5c21mgIWvz/4TaLUnxg KIDd5+7NxTy+/19Y4hjBp3fzO+/azrySXXv2zr7RcGpoHl71aJ90IxNal4/ny+XNY1n1 EvX7wxl8RHHRghJStcQo7wqa7tlLiL3q3ljVqohfAMDeiGiUlJlA2x9OMboUlz+Ruj6E +av8liiQRWNijOqb+6E3jw+mMdI3mDJqtnN7oqZL3dDN6awYvMNyXV5NlQFaR/OcUUaF ukuHbWFMY2NdQ3P2wc6/zeR7RvllMv5n6EUwjTzdQdr9K/Abs4STNOtpT+xdXoWtVqZQ asDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:arc-authentication-results; bh=7jHuQMqMc8CvxyK+Teu40fmLM4SxkYsKbVJ2JTM0sGA=; b=uGxQt6a0ZE4BbpqF2/C9P+IK0FPzdfS5AqBQSjECjy0rpiRQ9nceGjHe3qfdtLtOV7 LQUSWbeBX+hYeR7+OepjEhInVTbjWswdV4KN9ZnwDqniNX+NSpe88vQNZ9lg54VzEwzQ pkYpgagi9PvdN6Vx+ZkSWlveNio+I/3WU87kbvXElMUxvjoZvsIie4CNdmWrEFrVe/0u N4Cvf4XhmMgwCZ56HrS0FBBf26hR2VCFWDuIP2UXnvhsJ/aHCa7McwLRKs69BRZ4t5Qi fIAkAdQXg7bC+Axn3CR+EnNo9Cc9SysLaw3Yi4bT2GJYk5RVpf80Bed2zBuZ1Z2S0yEO cGUQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5-v6si3307176plv.94.2018.03.01.09.25.44; Thu, 01 Mar 2018 09:25:59 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033426AbeCARYW (ORCPT + 99 others); Thu, 1 Mar 2018 12:24:22 -0500 Received: from mail-oi0-f68.google.com ([209.85.218.68]:32785 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033295AbeCARYT (ORCPT ); Thu, 1 Mar 2018 12:24:19 -0500 Received: by mail-oi0-f68.google.com with SMTP id j81so5060663oia.0 for ; Thu, 01 Mar 2018 09:24:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7jHuQMqMc8CvxyK+Teu40fmLM4SxkYsKbVJ2JTM0sGA=; b=bPdRrMuTcuCMybKlCl/p7yp0BiiVcVdc4w8za1bKeL0JiaHInXXOsvk6OEGNOIWmHZ G05sIynGRCjAffpMrhgZyUgCSWqf5qbZCxsvEyPOhmJNTaZi3L/Ieky3gSp4yUIGKJg0 uOZeQoimrZjwL53kJ43m6UiOzwXWDV6VNN3Zy8eI3PahoiMpfPBdZVJkHuYG9JTX7UcV J+oW/gQZjAjCZYN84CKS9m7RJUPBb80m776r/V2POayGU+Ur3vHAUZ43b0fX9kg/FLaY N1I/6A1wUjawEQLcjJVO3qqkwynsIFXL/4dAWbOYsedIONdfIM7H3znDejRCtzOhC+ED SV2w== X-Gm-Message-State: AElRT7EOQayFkXTPI1P1Mhl8GsCmgbkVJWx9cppQCSPiQYM2XQidhnnR rhImm2bVbUR8AzrLoWZGw7AYfUPoNDRAwVRYru+Hgg== X-Received: by 10.202.80.13 with SMTP id e13mr1785831oib.304.1519925058483; Thu, 01 Mar 2018 09:24:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.57.246 with HTTP; Thu, 1 Mar 2018 09:24:17 -0800 (PST) In-Reply-To: <20180301152729.GM15057@dhcp22.suse.cz> References: <1519908465-12328-1-git-send-email-neelx@redhat.com> <20180301131033.GH15057@dhcp22.suse.cz> <20180301152729.GM15057@dhcp22.suse.cz> From: Daniel Vacek Date: Thu, 1 Mar 2018 18:24:17 +0100 Message-ID: Subject: Re: [PATCH] mm/page_alloc: fix memmap_init_zone pageblock alignment To: Michal Hocko Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Mel Gorman , Pavel Tatashin , Paul Burton , stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 1, 2018 at 4:27 PM, Michal Hocko wrote: > On Thu 01-03-18 16:09:35, Daniel Vacek wrote: >> 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? Sorry I forgot to answer this. If they were, the loop won't be skipping them, right? But it really does not matter here, kernel needs (some) page structures initialized anyways. And I do not feel comfortable with removing the VM_BUG_ON(). The initialization is what changed with commit b92df1de5d28, hence fixing this. --nX >> 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