From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E05EDC2D0DB for ; Sat, 25 Jan 2020 13:27:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7ECCA2071E for ; Sat, 25 Jan 2020 13:27:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="o3zwdhNd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7ECCA2071E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 02C846B0003; Sat, 25 Jan 2020 08:27:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F1F4A6B0005; Sat, 25 Jan 2020 08:27:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E62DE6B0007; Sat, 25 Jan 2020 08:27:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0196.hostedemail.com [216.40.44.196]) by kanga.kvack.org (Postfix) with ESMTP id C9E606B0003 for ; Sat, 25 Jan 2020 08:27:11 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 77844824559C for ; Sat, 25 Jan 2020 13:27:11 +0000 (UTC) X-FDA: 76416232662.26.arch02_78eb3e4b5e12a X-HE-Tag: arch02_78eb3e4b5e12a X-Filterd-Recvd-Size: 4700 Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Sat, 25 Jan 2020 13:27:10 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id x1so4978593iop.7 for ; Sat, 25 Jan 2020 05:27:10 -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=jFSby4jpU672POOTQ5aJD+MMYMnoY9gYo83gL/3QmgM=; b=o3zwdhNdAxwsJRTgPNWDgyS1kUEid918OP4lhihaBH2kcmVv8au1eTBRee2sUenYSd yX2k0BNoNwlB52gO6vBW3E7KswaalWdN5bkQVU89S8tLK8lbIC0kyZGML0zSY+ECy5JJ VQxAzDgcBZBISbwKjTLvexNe9Pw0e5d+Olxa8kCX9jBByj+ZZvt3VtrTqiesPcwyjQUN YYWwSShcotQIPq2yGJi6akxKoRaiOAfgsoIRq4e0MqT+UMoSo4ePFGUrgzTvJAP+NbYO +ulmzBTqwwXzMVnBZKJhXWIZ5zBd3zXhGNoJXPEjVm66mTvw52lbcxUtOtTfdBRZ44fs jWoQ== 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=jFSby4jpU672POOTQ5aJD+MMYMnoY9gYo83gL/3QmgM=; b=b67vX3Q3vdzIaaFbm/JKfk/774xgdXKftNpAm9dKavTtGcWAVfTyqAEQA+5DGFJVoJ Eq5xq2w67WL4vZaIx49aTM3c6ZY9MGvtZHMs5C/ojI7n1vmcofLm5vxbGswEwW4v9/cP fY5vd1vnD9AkwPHEa4gwF2ckMLY8TsRthGV0qzYUgzVs2HluWwjG4XZmtLriIb34UL0e +u78T7e8rtsS4wLSb+gISTe32WcLCTnkithY08mdnevL1KszAeg6lkRlXTtItHBVdqLa 70CGiKYvzgyO/QwF1U+nIoDklTK3Syq+LoIoM7i1+f/TTHsjPmTxCkh4i1XoGLdfzJvg yOoA== X-Gm-Message-State: APjAAAUHN57UEL90f22kcD73/w+2w7slDT+cZZG0pZ60QV5zaVNQRYcG bolF+cOeKPYDu/58BVMmFPb+kujmLQzbVDX7Yw== X-Google-Smtp-Source: APXvYqzFqso5fExE/vN7lqD+kDPUfbOIYxpeCOxPq/EaJjfGULlLyiKommh0F7rW9mohytKbK/l/29LoeED86UFTwN4= X-Received: by 2002:a02:a60e:: with SMTP id c14mr6561596jam.80.1579958830183; Sat, 25 Jan 2020 05:27:10 -0800 (PST) MIME-Version: 1.0 References: <1579487594-28889-1-git-send-email-kernelfans@gmail.com> <20200120072939.GD18451@dhcp22.suse.cz> <20200123191047.bc51b301e5ea0aae6eeecbd5@linux-foundation.org> <20200124064932.GN29276@dhcp22.suse.cz> In-Reply-To: <20200124064932.GN29276@dhcp22.suse.cz> From: Pingfan Liu Date: Sat, 25 Jan 2020 21:26:58 +0800 Message-ID: Subject: Re: [PATCHv2] mm/sparse: reset section's mem_map when fully deactivated To: Michal Hocko Cc: Andrew Morton , Linux-MM , David Hildenbrand , Dan Williams , Oscar Salvador , Baoquan He , Qian Cai , Kexec Mailing List , Kazuhito Hagio Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000069, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jan 24, 2020 at 2:49 PM Michal Hocko wrote: > > On Thu 23-01-20 19:10:47, Andrew Morton wrote: > > On Mon, 20 Jan 2020 08:29:39 +0100 Michal Hocko wrote: > > > > > On Mon 20-01-20 10:33:14, Pingfan Liu wrote: > > > > After commit ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug"), > > > > when a mem section is fully deactivated, section_mem_map still records the > > > > section's start pfn, which is not used any more and will be reassigned > > > > during re-added. > > > > > > > > In analogy with alloc/free pattern, it is better to clear all fields of > > > > section_mem_map. > > > > > > > > Beside this, it breaks the user space tool "makedumpfile" [1], which makes > > > > assumption that a hot-removed section has mem_map as NULL, instead of > > > > checking directly against SECTION_MARKED_PRESENT bit. (makedumpfile will be > > > > better to change the assumption, and need a patch) > > > > > > > > The bug can be reproduced on IBM POWERVM by "drmgr -c mem -r -q 5" , > > > > trigger a crash, and save vmcore by makedumpfile > > > > > > While makedumpfile lives very closely to the kernel and occasional > > > breakage is to be expected I still believe that Fixes: ba72b4c8cf60 > > > is due. > > > > But not a cc:stable? > > Well, I wouldn't say this is really critical. makedumpfile will get its > fix... But if people think it would be useful in stable I won't oppose. Yes, I think this patch is no more than a prototype improvement, and makedumpfile has better to get its fix. And I have sent a patch to kexec-list for it. (http://lists.infradead.org/pipermail/kexec/2020-January/024406.html) Thanks, Pingfan