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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY 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 4BC35C433DF for ; Wed, 24 Jun 2020 01:11:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CC3DD2078A for ; Wed, 24 Jun 2020 01:11:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC3DD2078A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 697BA6B0002; Tue, 23 Jun 2020 21:11:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 648F56B0003; Tue, 23 Jun 2020 21:11:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 55F736B0005; Tue, 23 Jun 2020 21:11:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0229.hostedemail.com [216.40.44.229]) by kanga.kvack.org (Postfix) with ESMTP id 3A0E96B0002 for ; Tue, 23 Jun 2020 21:11:25 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8983B2C81 for ; Wed, 24 Jun 2020 01:11:24 +0000 (UTC) X-FDA: 76962327288.25.woman67_360767626e40 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id 5B5F51804E3A0 for ; Wed, 24 Jun 2020 01:11:24 +0000 (UTC) X-HE-Tag: woman67_360767626e40 X-Filterd-Recvd-Size: 2903 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Wed, 24 Jun 2020 01:11:23 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R341e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01419;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0U0Xwint_1592961078; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U0Xwint_1592961078) by smtp.aliyun-inc.com(127.0.0.1); Wed, 24 Jun 2020 09:11:18 +0800 Date: Wed, 24 Jun 2020 09:11:18 +0800 From: Wei Yang To: Dan Williams Cc: Wei Yang , Andrew Morton , Oscar Salvador , Linux MM , Linux Kernel Mailing List , David Hildenbrand Subject: Re: [PATCH] mm/spase: never partially remove memmap for early section Message-ID: <20200624011118.GA9422@L-31X9LVDL-1304.local> Reply-To: Wei Yang References: <20200623094258.6705-1-richard.weiyang@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 5B5F51804E3A0 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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 Tue, Jun 23, 2020 at 05:21:06PM -0700, Dan Williams wrote: >On Tue, Jun 23, 2020 at 2:43 AM Wei Yang > wrote: >> >> For early sections, we assumes its memmap will never be partially >> removed. But current behavior breaks this. > >Where do we assume that? > >The primary use case for this was mapping pmem that collides with >System-RAM in the same 128MB section. That collision will certainly be >depopulated on-demand depending on the state of the pmem device. So, >I'm not understanding the problem or the benefit of this change. Hi, Dan There is a discussion in the thread you just replied: mm/shuffle: don't move pages between zones and don't read garbage memmaps Besides this, the comment in section_activate() says: * The early init code does not consider partially populated * initial sections, it simply assumes that memory will never be * referenced. If we hot-add memory into such a section then we * do not need to populate the memmap and can simply reuse what * is already there. Per my understanding, if we hot-add then hot-remove the sub-section, we may not have a valid memmep for this part sub-section? Because we depopulate it at hot-remove while we don't populate it when hot-add. Is my understanding correct? -- Wei Yang Help you, Help me