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.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 61F1DC2D0CE for ; Fri, 24 Jan 2020 06:49:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 211C720709 for ; Fri, 24 Jan 2020 06:49:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 211C720709 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C20596B02B3; Fri, 24 Jan 2020 01:49:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BD15C6B02B4; Fri, 24 Jan 2020 01:49:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B0DCE6B02B5; Fri, 24 Jan 2020 01:49:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0143.hostedemail.com [216.40.44.143]) by kanga.kvack.org (Postfix) with ESMTP id 9ADA16B02B3 for ; Fri, 24 Jan 2020 01:49:36 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 4D070824556B for ; Fri, 24 Jan 2020 06:49:36 +0000 (UTC) X-FDA: 76411601952.18.cause40_53d212e7e8314 X-HE-Tag: cause40_53d212e7e8314 X-Filterd-Recvd-Size: 2661 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Fri, 24 Jan 2020 06:49:35 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DC164AD41; Fri, 24 Jan 2020 06:49:33 +0000 (UTC) Date: Fri, 24 Jan 2020 07:49:32 +0100 From: Michal Hocko To: Andrew Morton Cc: Pingfan Liu , linux-mm@kvack.org, David Hildenbrand , Dan Williams , Oscar Salvador , Baoquan He , Qian Cai , kexec@lists.infradead.org, Kazuhito Hagio Subject: Re: [PATCHv2] mm/sparse: reset section's mem_map when fully deactivated Message-ID: <20200124064932.GN29276@dhcp22.suse.cz> References: <1579487594-28889-1-git-send-email-kernelfans@gmail.com> <20200120072939.GD18451@dhcp22.suse.cz> <20200123191047.bc51b301e5ea0aae6eeecbd5@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200123191047.bc51b301e5ea0aae6eeecbd5@linux-foundation.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. -- Michal Hocko SUSE Labs