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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 6DB8EC33CB3 for ; Fri, 17 Jan 2020 07:47:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3C74620728 for ; Fri, 17 Jan 2020 07:47:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C74620728 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 B6E026B0327; Fri, 17 Jan 2020 02:47:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B1ED16B0328; Fri, 17 Jan 2020 02:47:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A33EA6B0329; Fri, 17 Jan 2020 02:47:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0167.hostedemail.com [216.40.44.167]) by kanga.kvack.org (Postfix) with ESMTP id 8ACC76B0327 for ; Fri, 17 Jan 2020 02:47:50 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 3D4098245571 for ; Fri, 17 Jan 2020 07:47:50 +0000 (UTC) X-FDA: 76386347100.15.wall81_27457353e2f39 X-HE-Tag: wall81_27457353e2f39 X-Filterd-Recvd-Size: 2604 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Fri, 17 Jan 2020 07:47:49 +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 398E4AAA6; Fri, 17 Jan 2020 07:47:47 +0000 (UTC) Date: Fri, 17 Jan 2020 08:47:46 +0100 From: Michal Hocko To: Pingfan Liu , Dan Williams Cc: Linux-MM , Andrew Morton , David Hildenbrand , Oscar Salvador , Kexec Mailing List , Kazuhito Hagio Subject: Re: [PATCH] mm/sparse: reset section's mem_map when fully deactivated Message-ID: <20200117074746.GF19428@dhcp22.suse.cz> References: <1579143668-27941-1-git-send-email-kernelfans@gmail.com> <20200116075000.GM19428@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) 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 Thu 16-01-20 23:14:02, Dan Williams wrote: > On Thu, Jan 16, 2020 at 10:23 PM Pingfan Liu wrote: > > > > On Thu, Jan 16, 2020 at 3:50 PM Michal Hocko wrote: > > > > > > On Thu 16-01-20 11:01:08, Pingfan Liu wrote: > > > > When fully deactivated, it is meaningless to keep the value of a section's > > > > mem_map. And its mem_map will be reassigned during re-added. > > > > > > > > Beside this, it breaks the user space tool "makedumpfile", which makes > > > > assumption that a hot-removed section having mem_map as NULL. > > > > > > We used to do that before ba72b4c8cf60 ("mm/sparsemem: support > > > sub-section hotplug"). Dan was this an intentional change? > > I do not know the purpose of this. But the change just leave section > > start pfn in fully deactivated section_mem_map, and not used any more. > > Not intentional, IIRC at the time I had convinced myself that the > value would always be translated by sparse_decode_mem_map(), so I > thought it could be hiding NULL de-references. I don't see any harm > in the patch. Thanks for the confirmation. It would be great to have this in the changelog. -- Michal Hocko SUSE Labs