Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1735642ybt; Thu, 25 Jun 2020 12:48:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkvIiFGXF4oVx+aLXHQa+qSLS10zemtC5AsDnmscnjv/yCk/QexbcE3wl8sKguhHT5Q+mM X-Received: by 2002:a17:907:2149:: with SMTP id rk9mr16854997ejb.553.1593114523161; Thu, 25 Jun 2020 12:48:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593114523; cv=none; d=google.com; s=arc-20160816; b=gTg3701YHstBNOoxb3GldRFForzJi8apgMMf0haTL9ZUjfJ0KiiVVZ051jOYS7DX96 WL8/LD8/N8Jufdeh6Q1WEwu9Byr7GtsXW7YkqfDHW0K37CTTAwTLJfJMaQb9p5OGUCIQ 37L499rvD9XRfyOqxWX8uyXfOO/br8ms54jEq4GP5tYJaFbBNmQos1Yo2I7QD27uj8Fe LWKdNibZS+WAOCXWVnqB3cGiVhIA0iiVrvuMLtUKWX3s73yvh/4UWxgXqflMpFOy1thM +GxyP5az9nm4ekbKuZ7SwLFEaTJIBTSUI7oa9roh61KxfsRdWEPvu2x526GeG+1OZn+P PU1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=AefTn81PCzGoV6RydnPvgSzeIlVQ4BF3GxcojiBqKZA=; b=LLoYuYbDg/paHq8LSYs+ubs+50B9qwjlFZYemsyejEYgBWrirmve+eW70ZtQ/30LDs TniJey7c2eF08ZRo95my++W+RkDGgulNFyL9V+XV6Mw9NOyCV3UYaGdozagp72Nj3E3n FN5Cigk5tjAQdPVL4vJwiso6lXEDaoBKZD3CqaxA+juHPWS/hVSmapyAAcBHc0MwWn/6 82Qf5Bkbshu7oqPZawJMfL43Vs1gaO4FwGGIztwWlV3kt7feBVHQG+XtQeUBV9+d+Nx8 iaux4zd+6AmeFX7lJ1Bgj4/3b2eGUpgBpEwKpl/ebqLPCgU7lWfSWlGhNGYgO/STG87Z JJHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="AxlvF/uw"; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c20si8747642edj.314.2020.06.25.12.48.18; Thu, 25 Jun 2020 12:48:43 -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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b="AxlvF/uw"; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406697AbgFYTq5 (ORCPT + 99 others); Thu, 25 Jun 2020 15:46:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728488AbgFYTq5 (ORCPT ); Thu, 25 Jun 2020 15:46:57 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC907C08C5C1 for ; Thu, 25 Jun 2020 12:46:56 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id d15so5146585edm.10 for ; Thu, 25 Jun 2020 12:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=AefTn81PCzGoV6RydnPvgSzeIlVQ4BF3GxcojiBqKZA=; b=AxlvF/uwBUXEWSNxZBaEe3m164Hbx4XTV0ok9IVSxL3WwUjg0S14qEk5V3q/m1YWCX f/GApWn9oUv85ISrxZVua0JeuaEE/fku6jYvspd/F9ORpVrPKEDZkcfPvYZZgWHC5JGe LsMx7B62R7EW+lTgAQq/HpTS9RtvhuU/1dPHEwBWzipKG6LeNXhdwqh+m9nEr9KDt6HX 9Mim9gnY2xk1RZOi8rC+xmsJeikzLvTJW3KJzpkyOS86DlL45jlvPq6LcbX5EEK248p1 cuc9ZHE1pHwXQzIhVQTWhAJFmYSpdnH8wEpNGkoa3y0SrdJLdDoVtBi1yOigY0csiUFa Imtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=AefTn81PCzGoV6RydnPvgSzeIlVQ4BF3GxcojiBqKZA=; b=R9BqGkfZe0C0kMc4YmeL2HuoKkbVo3XSzLcqK0HXlNdMcEYBR2FikEI6zul7+SrTL7 DClhYKoo3XWpSuLYjCy2ii3oAlXoWZErMbtk50my6PCaVPjjTlZ9cKHInUDinNmw4UJA m7kVwK7qxx3VZLmTfp645FE3QWFnsbAYhsXNuH44PIAEaqEOn9q/IC0dECP/o9kTuYGI I8EeimhSMt6wG+FOSmc4SZ2oMynjCNkbesWMqdIkd63Rtovtnk1ZXRgRECRBN3niRK0T IWiDReWuPAM5boZOZwp5xBs9kBMHlLZJLsb8wYuYJwyALfKuTlN1a7mkBGE8bCuKx5ea 0Tuw== X-Gm-Message-State: AOAM530evh4XQSUjlJYafgHAB6VoBiW8/+6JaQLBDHYTm6/glM74c7a1 9abRXHnA8MTD4woiHMnT6XYxhasU8G3FsJWGlQl20w== X-Received: by 2002:a05:6402:459:: with SMTP id p25mr33041747edw.383.1593114415366; Thu, 25 Jun 2020 12:46:55 -0700 (PDT) MIME-Version: 1.0 References: <4D73CD59-BFD5-401A-A001-41F7BF5641BA@redhat.com> In-Reply-To: <4D73CD59-BFD5-401A-A001-41F7BF5641BA@redhat.com> From: Dan Williams Date: Thu, 25 Jun 2020 12:46:43 -0700 Message-ID: Subject: Re: [PATCH] mm/spase: never partially remove memmap for early section To: David Hildenbrand Cc: Wei Yang , Michal Hocko , Andrew Morton , Oscar Salvador , Linux MM , Baoquan He , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2020 at 10:53 PM David Hildenbrand wrote= : > > > > > 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 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 retu= rn 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_o= nline_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.