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=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 8D6CAC433DF for ; Thu, 25 Jun 2020 19:46:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 346F62076E for ; Thu, 25 Jun 2020 19:46:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=intel-com.20150623.gappssmtp.com header.i=@intel-com.20150623.gappssmtp.com header.b="AxlvF/uw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 346F62076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 833008D000E; Thu, 25 Jun 2020 15:46:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7E4826B005D; Thu, 25 Jun 2020 15:46:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6D2C58D000E; Thu, 25 Jun 2020 15:46:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id 4E7176B005C for ; Thu, 25 Jun 2020 15:46:58 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B7F8C181ABE84 for ; Thu, 25 Jun 2020 19:46:57 +0000 (UTC) X-FDA: 76968767274.05.seat35_18042e326e4f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 94C931800089B for ; Thu, 25 Jun 2020 19:46:57 +0000 (UTC) X-HE-Tag: seat35_18042e326e4f X-Filterd-Recvd-Size: 4274 Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Thu, 25 Jun 2020 19:46:56 +0000 (UTC) Received: by mail-ed1-f50.google.com with SMTP id e15so5169672edr.2 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=hXFyxSSby/QHvjbQB9Ie0PHE+HZldiLbP/e45YrfD9xiCVKu6D0sOFBh1u7NOz/C/F bRZbVLi2NnFaLbNho6CFTKow45XZsjLCtof9s1NO5KR/U5bWLOKptfQtZfzGV6jdkdo+ 2iMhr6Wrc26M4XELCjUDEGQaHQ9oaTVdyChWJJz9gYBRSBr2jBEbR3HwwFhZqHqTHKuV E7HVx/QK9F6RpkZZ22+8e7tFMKysdn55oI2I2CK+epLZZvIw5GtBo2X3k7tJ9+Fe2J74 023oiCKoEhA5XOf/8gWnh48OcdlBlbDkwbXIKmE5WzsT0WIhvshRoyBm4QC8m2aezW/j RK6g== X-Gm-Message-State: AOAM532KxrEJFL+ODBSbzDJbV7Ra7UCxLxnNCFa2R5scqURfx/m47Ip5 GYYsJlFcJzk/2XknaSNx1tufKIKg/KnNUfzvO8wXhQ== X-Google-Smtp-Source: ABdhPJy7r4zUfBbgkWGwZe/U0m7RIacDfnm09kXSX9vVu6c/1xpVMZWQHAtCnB5foW5Wa5QRjexSRvZowQeJGc1NoY4= 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 X-Rspamd-Queue-Id: 94C931800089B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 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.