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,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 D7AAAC433DF for ; Mon, 29 Jun 2020 08:34:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A13FC2335A for ; Mon, 29 Jun 2020 08:34:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A13FC2335A 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 EA3876B000D; Mon, 29 Jun 2020 04:34:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E52406B0010; Mon, 29 Jun 2020 04:34:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D41C56B0022; Mon, 29 Jun 2020 04:34:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0147.hostedemail.com [216.40.44.147]) by kanga.kvack.org (Postfix) with ESMTP id BA87A6B000D for ; Mon, 29 Jun 2020 04:34:16 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 816BF824805A for ; Mon, 29 Jun 2020 08:34:16 +0000 (UTC) X-FDA: 76981587312.05.kitty78_060ad1326e6d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 5BA6218018150 for ; Mon, 29 Jun 2020 08:34:16 +0000 (UTC) X-HE-Tag: kitty78_060ad1326e6d X-Filterd-Recvd-Size: 3500 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Mon, 29 Jun 2020 08:34:15 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0U1-ttkC_1593419651; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U1-ttkC_1593419651) by smtp.aliyun-inc.com(127.0.0.1); Mon, 29 Jun 2020 16:34:11 +0800 Date: Mon, 29 Jun 2020 16:34:11 +0800 From: Wei Yang To: Dan Williams Cc: David Hildenbrand , Wei Yang , Michal Hocko , Andrew Morton , Oscar Salvador , Linux MM , Baoquan He , Linux Kernel Mailing List Subject: Re: [PATCH] mm/spase: never partially remove memmap for early section Message-ID: <20200629083411.GA38188@L-31X9LVDL-1304.local> Reply-To: Wei Yang References: <4D73CD59-BFD5-401A-A001-41F7BF5641BA@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 5BA6218018150 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000062, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jun 25, 2020 at 12:46:43PM -0700, Dan Williams wrote: >On Wed, Jun 24, 2020 at 10:53 PM David Hildenbrand wr= ote: >> >> >> >> > Am 25.06.2020 um 01:47 schrieb Dan Williams : >> > >> > =EF=BB=BFOn Wed, Jun 24, 2020 at 3:44 PM Wei Yang >> > wrote: >> > [..] >> >>> So, you are right that there is a mismatch here, but I think the >> >>> comprehensive fix is to allow early sections to be partially >> >>> depopulated/repopulated rather than have section_activate() and >> >>> section_deacticate() special case early sections. The special casi= ng >> >>> is problematic in retrospect as section_deactivate() can't be >> >>> maintained without understand special rules in section_activate(). >> >> >> >> Hmm... This means we need to adjust pfn_valid() too, which always r= eturn true >> >> for early sections. >> > >> > Right, rather than carry workarounds in 3 locations, and the bug tha= t >> > has resulted from then getting out of sync, just teach early section >> > mapping to allow for the subsection populate/depopulate. >> > >> >> I prefer the easy fix first - IOW what we Here here. Especially, pfn_t= o_online_page() will need changes as well. > >Agree, yes, let's do the simple fix first for 5.8 and the special-case >elimination work later. Dan, A quick test shows this is not a simple task. First, early sections don't set subsection bitmap, which is necessary for= the hot-add/remove. To properly set subsection bitmap, we need to know how many subsections i= n early section. While current code doesn't has a alignment requirement for last early section. We mark the whole last early section as present. I don't find a way to enable this. --=20 Wei Yang Help you, Help me