Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp114564ybt; Thu, 25 Jun 2020 16:50:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPsuysS5Rtke4rQg4waYVIGun9j/zsAI7qlHlJ+/rWFmVKK2dIG2OoorRzp35QyP7itskV X-Received: by 2002:a17:906:3c42:: with SMTP id i2mr259291ejg.14.1593129025820; Thu, 25 Jun 2020 16:50:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593129025; cv=none; d=google.com; s=arc-20160816; b=KOgzrFLppguZ+JYLP2afGSE3Bg8UKNL23GW0fV0wFv6623Afq7isRMTifQdzqHOgXa gtApK6rAG1IDmhgk0tUYEJe5ptyzEMbMoAnill2rvlE9zSFYTiEVDyqQWBjU9PH9DkQc sxOydHwzo8gUL/zKTTgrCbBt8M3w7PH8ztJ0OmT1kri4ANmB/5fos/PvrKgiuq7o0IQD pKsHDKyneAxNyhmllClpZ/vPzub6hii2ivdQJwpo6vHgrHRTrD5h1nzQMePIAoLHQOwm //T5PWoIDHfbO9ax1/r+wAm/oWL/q2J0ms/WxH03KbJuuZQ8R+fM+ZhCguWE+HhhojNY sCrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date; bh=muYI3fjlOOXfUuGc9nZrft9tl7kzhi+pPPVUuB2ZAIg=; b=yGPdt83hshyYuQOM/drhrrGb64OyGipPUb27p+0dVN+Y73sq02TB2gJH7VYYI8hzbG bg78y3JRc0yUYrvG/VQNqDzxqMCuOWLXKTCIaPv5K09S7MJNSEfoQabdonbA8MEQ4QYP QKUjZftWDgbKpU38f2vhM0X2youaBP8A/7w/VPsd4aWG3k+kLHV5jXw0XDo9Pr3cBii1 qS/Pi4nDknjy/goryPtRMnJ7Ir9yEK7D3YD7+lr8nf8Ry/Sptpun1wTjnqLXI7Q93nDQ Tn4ecf40+VKa0h4zeWsIFQJ3yp0JtIsX8B2RaIgntRsvRNLsSoD40uBTNkPO7YCisy89 1aOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l24si2438139ejp.69.2020.06.25.16.50.02; Thu, 25 Jun 2020 16:50:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407550AbgFYWjz (ORCPT + 99 others); Thu, 25 Jun 2020 18:39:55 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:41028 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407537AbgFYWjz (ORCPT ); Thu, 25 Jun 2020 18:39:55 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R371e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07425;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0U0i1MZd_1593124792; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U0i1MZd_1593124792) by smtp.aliyun-inc.com(127.0.0.1); Fri, 26 Jun 2020 06:39:52 +0800 Date: Fri, 26 Jun 2020 06:39:52 +0800 From: Wei Yang To: David Hildenbrand Cc: Dan Williams , 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: <20200625223952.GA17926@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 Content-Transfer-Encoding: 8bit In-Reply-To: <4D73CD59-BFD5-401A-A001-41F7BF5641BA@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 25, 2020 at 07:53:37AM +0200, David Hildenbrand wrote: > > >> Am 25.06.2020 um 01:47 schrieb Dan Williams : >> >> On 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 casing >>>> 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 return true >>> for early sections. >> >> Right, rather than carry workarounds in 3 locations, and the bug that >> 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_to_online_page() will need changes as well. > Hi, David, Which part of pfn_to_online_page() needs to be changed? pfn_valid_within() would call pfn_valid() to check the pfn first. This looks enough for me. I may not follow you at this part. >At least my ack stands. -- Wei Yang Help you, Help me