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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 71129C35240 for ; Fri, 24 Jan 2020 03:10:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 121BC2077C for ; Fri, 24 Jan 2020 03:10:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="gv4Q3Aef" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 121BC2077C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 633A36B02A2; Thu, 23 Jan 2020 22:10:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 60B366B02A4; Thu, 23 Jan 2020 22:10:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 548486B02A5; Thu, 23 Jan 2020 22:10:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0075.hostedemail.com [216.40.44.75]) by kanga.kvack.org (Postfix) with ESMTP id 4217A6B02A2 for ; Thu, 23 Jan 2020 22:10:50 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id E797A181AC9BF for ; Fri, 24 Jan 2020 03:10:49 +0000 (UTC) X-FDA: 76411050618.02.neck16_416ef2f825927 X-HE-Tag: neck16_416ef2f825927 X-Filterd-Recvd-Size: 2877 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Fri, 24 Jan 2020 03:10:49 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 07D3620718; Fri, 24 Jan 2020 03:10:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579835448; bh=cfX1pOorTYhYcRA3gQj9casd6lz9OxT0kQGAHTd/foU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gv4Q3AefI4cb/4OO9hWV1VOp2xMo/zOtrN8yyOtR8oAoasxfdxfq92mhdUSjZzjiD XuPA0lCnOk20m7abEtvEkMKxM+P3vv3EoARXO9HEwjHW5frh7bunYJrkWN0OF7yCou hCwSQG2vbuauVfpw/ZMQMC2g9y7MDCmHeoWAH0yA= Date: Thu, 23 Jan 2020 19:10:47 -0800 From: Andrew Morton To: Michal Hocko 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: <20200123191047.bc51b301e5ea0aae6eeecbd5@linux-foundation.org> In-Reply-To: <20200120072939.GD18451@dhcp22.suse.cz> References: <1579487594-28889-1-git-send-email-kernelfans@gmail.com> <20200120072939.GD18451@dhcp22.suse.cz> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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?