Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3135973imu; Sun, 27 Jan 2019 22:37:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN75er0TAnL/GAcRj57T5TNzlGFBOCT5QQk1O7KKfG/bIfwp56e34KZeRtrm5iR/DV6PbdsE X-Received: by 2002:a62:824c:: with SMTP id w73mr20636429pfd.150.1548657463011; Sun, 27 Jan 2019 22:37:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548657462; cv=none; d=google.com; s=arc-20160816; b=Ik43g6OhwBd+e5mp/FBM63DIZrLWZQJT5TFd5D+dMlzaEjIGsn6On8ncOSm1kOMTON a5CT1KLZwm0/bl6IuPPyIxY1g9OjnLM6/aAIRLi9bsjYuiZ6tBGLD1o+j/ANVZocy6Vq 5Jqv52GA9itgguxHAWn27eP6GmiPScmD6g21QRcSNYvJP7DNhA8BBND6cWt/cYKzklq7 PpRJqpg2QvUKagNFdfSCXmAbTELckHEUr1759enJTgQvadfpatw3Vk4ZQJ1NMx+SkzYe g22PPeG85LknjnXpqFNeg9Y+VuGkU9b9KAYG6qq9t0Bt2wXq32PX8mK9xWlpu4F6amI7 qlLw== 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 :in-reply-to:references:mime-version:dkim-signature; bh=m+fgtZwQfJUOjsKuLflFh7dV5h2h2KZCLYosg+iy5eM=; b=xm9l3JkGlJK5VlyvRmZ5/WxW+5R72+0F7/3JTzLe+053InN3+LDdpwtObHXsiGPPqT djz+ZtkClORS2UVYxHs9z0MPjZszzrY8I0s9z1joZ5uH/pPgh9QQC839dV5D9NSvIOfG r3E+DMhFGukb8LjA1hgrNtUfCX9P4pWSZj8Pc/uI+MKUqBPb88m6c/gnJMBWf4uu2l5I 2xRw/0NBE6f2cMIKmz92gcS++hbekb8n56fJuTxDL8ZLKoEiNx9mJdF3O4TBobbRn4xu 3nvz2Y5wSCnrvOYeqRU9Yrhmu7d0GRKbAoyW+J29aEHxnlx306/Fee3Gz7eNnwHISg3M oFfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HCm6NIpN; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 92si32834508pld.84.2019.01.27.22.37.27; Sun, 27 Jan 2019 22:37:42 -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=pass header.i=@gmail.com header.s=20161025 header.b=HCm6NIpN; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726754AbfA1GhM (ORCPT + 99 others); Mon, 28 Jan 2019 01:37:12 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:37391 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbfA1GhM (ORCPT ); Mon, 28 Jan 2019 01:37:12 -0500 Received: by mail-it1-f196.google.com with SMTP id b5so17806255iti.2 for ; Sun, 27 Jan 2019 22:37:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m+fgtZwQfJUOjsKuLflFh7dV5h2h2KZCLYosg+iy5eM=; b=HCm6NIpNvTg6MqObHqGOITnA0E18gW4uZ/V5VUD2cBU70FSDioHBHnGyL08Mn7tBuj UHuEbJKpSSNkaXnUmxn+QEPzgU0GAK3NVnYeU1CSs0Bv8u2cn0Jneeo5Uq8lIT+ZbNMa tzjlT1KGu85XMwFutwExZBnXKjggzMhN4T04/7iLYVpRpJJy/5HKuu0jGQc8DMc5qMAV r9yRxPyv6zNyFzMDNDzeyaCjlWO66yyU9nnM4HCpyy/ei1d7BAsdAbIWyfwm5+fc6KwO 47WsUzId+S8VPLidgOEUMGfZ2sFTNvT/QsgpDZ6Mrj+uH2GOmfTrigudfbVORcWW3Ph0 qjpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m+fgtZwQfJUOjsKuLflFh7dV5h2h2KZCLYosg+iy5eM=; b=oUA5aYh9ZAnyyyuU5XHqzgia3L1svMRFx9Zf08zSl+IUEaH/JBR/mDQBNMnpN0vQLg 68k+LmeDYeGcHSZafg0KI+/NrljKeg5602+zqpeKaOg+QQni4jEvTrS1XHLrUZ+HRit8 hjGkmHEydaOZdEVmT7GrTgY16K2Qze4F3pD7+AU6D33Y/BSE75AeEPNp7tfgH6d4KPy3 e5E6sIjfd9FOoVW8MKuUwKOkVcCJjKlzwDCSG9EbC1CZYuNkXfs9eb+OXHtszcCecCJq 2TUCyGlGanOttSNSFxzd2IVfd3dS+mH2rrMagm/QBDmHzXJGTELjAcSpaUZoyc71AoZF UrpQ== X-Gm-Message-State: AJcUukf4J46dkjlRZ+nQ5RPbLbr2xe7S7g07N+iVVLu49yY5RfGRnIGU BfK2ewKNWGvLCOGJtMkfFnAl2DNGBCX3M8x/Crk= X-Received: by 2002:a24:d04:: with SMTP id 4mr9035526itx.19.1548657430991; Sun, 27 Jan 2019 22:37:10 -0800 (PST) MIME-Version: 1.0 References: <20190125073704.GC3560@dhcp22.suse.cz> <20190125081924.GF3560@dhcp22.suse.cz> <20190125082952.GG3560@dhcp22.suse.cz> <20190125155810.GQ3560@dhcp22.suse.cz> <20190125163938.GA20411@dhcp22.suse.cz> <20190125173315.GC20411@dhcp22.suse.cz> <20190125181549.GE20411@dhcp22.suse.cz> In-Reply-To: <20190125181549.GE20411@dhcp22.suse.cz> From: Mikhail Gavrilov Date: Mon, 28 Jan 2019 11:37:00 +0500 Message-ID: Subject: Re: kernel panic due to https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2830bf6f05fb3e05bc4743274b806c821807a684 To: Michal Hocko Cc: robert shteynfeld , Linus Torvalds , Mikhail Zaslonko , Linux List Kernel Mailing , Gerald Schaefer , Dave Hansen , Alexander Duyck , Andrew Morton , Pavel Tatashin , Steven Sistare , Daniel Jordan , Bob Picco 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 > Linus, could you take the revert please? > > From 817b18d3db36a6900ca9043af8c1416c56358be3 Mon Sep 17 00:00:00 2001 > From: Michal Hocko > Date: Fri, 25 Jan 2019 19:08:58 +0100 > Subject: [PATCH] Revert "mm, memory_hotplug: initialize struct pages for the > full memory section" > > This reverts commit 2830bf6f05fb3e05bc4743274b806c821807a684. > > The underlying assumption that one sparse section belongs into a single > numa node doesn't hold really. Robert Shteynfeld has reported a boot > failure. The boot log was not captured but his memory layout is as > follows: > [ 0.286954] Early memory node ranges > [ 0.286955] node 1: [mem 0x0000000000001000-0x0000000000090fff] > [ 0.286955] node 1: [mem 0x0000000000100000-0x00000000dbdf8fff] > [ 0.286956] node 1: [mem 0x0000000100000000-0x0000001423ffffff] > [ 0.286956] node 0: [mem 0x0000001424000000-0x0000002023ffffff] > > This means that node0 starts in the middle of a memory section which is > also in node1. memmap_init_zone tries to initialize padding of a section > even when it is outside of the given pfn range because there are code > paths (e.g. memory hotplug) which assume that the full worth of memory > section is always initialized. In this particular case, though, such a > range is already intialized and most likely already managed by the page > allocator. Scribbling over those pages corrupts the internal state and > likely blows up when any of those pages gets used. > > Reported-by: Robert Shteynfeld > Fixes: 2830bf6f05fb ("mm, memory_hotplug: initialize struct pages for the full memory section") > Cc: stable > Signed-off-by: Michal Hocko > --- > mm/page_alloc.c | 12 ------------ > 1 file changed, 12 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index d295c9bc01a8..35fdde041f5c 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -5701,18 +5701,6 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone, > cond_resched(); > } > } > -#ifdef CONFIG_SPARSEMEM > - /* > - * If the zone does not span the rest of the section then > - * we should at least initialize those pages. Otherwise we > - * could blow up on a poisoned page in some paths which depend > - * on full sections being initialized (e.g. memory hotplug). > - */ > - while (end_pfn % PAGES_PER_SECTION) { > - __init_single_page(pfn_to_page(end_pfn), end_pfn, zone, nid); > - end_pfn++; > - } > -#endif > } > > #ifdef CONFIG_ZONE_DEVICE Michal, I suppose that revert the commit 2830bf6f05fb3e05bc4743274b806c821807a68 are return my issue https://marc.info/?l=linux-mm&m=154499704718428 Are any other better approach would be proposed for fixing my issue? -- Best Regards, Mike Gavrilov.