Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp114339ybt; Thu, 25 Jun 2020 16:49:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwya734OxxDuR76bHXN1A3QgMK+5Uc3QDIF5dFO93IY+3g1ZxZLbK7DGLf6vEQC5Q0iKOW3 X-Received: by 2002:aa7:c41a:: with SMTP id j26mr706710edq.13.1593128996307; Thu, 25 Jun 2020 16:49:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593128996; cv=none; d=google.com; s=arc-20160816; b=lX2ptAkdQY6aMKY+gIUi/tCqwWpgg10ikTCdpK125eoYLzMFN3JLr33uISKVTIpfJB BBUXt7pJWsa9jPPaVWqbiaGZCfYIChX0btT1XXeO1kkafhQDH7duMeFAGyms/BrnGtBj 9+1ljjkODYav71tFAvR9qMjdirwmacemviOLqCvJ0SJKJhSMNDH2LannmaTmPHnEqJ+q TOkBgU6lK1ywGu3jb6hqgh3bW0TRrG4EwjCz2TT+Gh7x/PA3N4tAsw8VDateNOmna8CZ HzhCF519Tb7CXGYSztsaQxQ8kd6s/o+QAGtjazfBkpbq48eCrO+07EKqoNXlYJHA1UyU 3UWw== 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=wbEkHExjqe1y4K9BLQpuhm4vWpTICSc2WYTlz3N3Y6w=; b=tYJj9JTzTCY1OeFq+LIPAQPPbs5g7L8DMO8IwSChU/iT+UpYJyN59vBnPBHHyJobOC ehSljPssEDqrkt7Qr5hcMsPc524VdtiyxT/5/nm0ITM6KG75ik0yd/i++WGc4jFqr+ps Wn7grdJ9eM+uUvl0jQEwsruPb2Ga8Hne7WUGhkKoxAQvRE8pK1IoHWvH90Jyj2mwFzkX kcWfZyni3r/9G9gTWYoNBLeiQsGQbRzFrXLQQbGJDoayUumDeI+YsTwQx8IudGIaa7Dg w6xPNbKsnc1RqA2P+yYjgQFOmsQybE+vS2J4SFP4oGET3YNqH4VRHtIUzBzQPNUBgUKx GH2g== 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 gu20si15885138ejb.13.2020.06.25.16.49.32; Thu, 25 Jun 2020 16:49:56 -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 S2406484AbgFYW3p (ORCPT + 99 others); Thu, 25 Jun 2020 18:29:45 -0400 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:47766 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404360AbgFYW3o (ORCPT ); Thu, 25 Jun 2020 18:29:44 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R711e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04397;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0U0hvnAM_1593124180; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U0hvnAM_1593124180) by smtp.aliyun-inc.com(127.0.0.1); Fri, 26 Jun 2020 06:29:41 +0800 Date: Fri, 26 Jun 2020 06:29:40 +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: <20200625222940.GA16822@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: 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 12:46:43PM -0700, Dan Williams wrote: >On Wed, Jun 24, 2020 at 10:53 PM 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. > >Agree, yes, let's do the simple fix first for 5.8 and the special-case >elimination work later. Ok, let me send v2 with detailed change log and a comment in code first. Thanks all for your time. -- Wei Yang Help you, Help me