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.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 CE6B9C433E0 for ; Thu, 25 Jun 2020 05:53:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6FE9820709 for ; Thu, 25 Jun 2020 05:53:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YKJDbB59" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FE9820709 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C52306B0002; Thu, 25 Jun 2020 01:53:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BDB106B0003; Thu, 25 Jun 2020 01:53:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA2476B0005; Thu, 25 Jun 2020 01:53:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0051.hostedemail.com [216.40.44.51]) by kanga.kvack.org (Postfix) with ESMTP id 8FD436B0002 for ; Thu, 25 Jun 2020 01:53:44 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 282B22C84 for ; Thu, 25 Jun 2020 05:53:44 +0000 (UTC) X-FDA: 76966667568.19.hole14_1d0890126e4a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 06E2D1AD1B2 for ; Thu, 25 Jun 2020 05:53:44 +0000 (UTC) X-HE-Tag: hole14_1d0890126e4a X-Filterd-Recvd-Size: 4786 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Thu, 25 Jun 2020 05:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593064423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b3f3FM+nb0f3RksLf2zHN9GsGpbsIBjQ9gfpuywISHg=; b=YKJDbB59q36j6ZHeDhirx/yK6zOW1P2Kk9ejv+T3oPvajq25jPPKBeL4Cufg3FLCZ0Py0C jLeBZKmgsMp6ycPE85sztXRHfK7W4VIsfbRNKQltJ9PfFa5DA3YjZHInP8Fs9X9sqNzpq3 rFdLTbIPO188bGSQJP6WjQQBwPOcCrA= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-344-hZjZ1WH-MKiTseqjFMV4oQ-1; Thu, 25 Jun 2020 01:53:41 -0400 X-MC-Unique: hZjZ1WH-MKiTseqjFMV4oQ-1 Received: by mail-wr1-f70.google.com with SMTP id p10so6039139wrn.19 for ; Wed, 24 Jun 2020 22:53:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=cDJsuG6GtXcaphjSiqDFSb49Cz2RH/+bn5qUN8ueiH8=; b=gb38xeCTrI2e7kX92gA9nqM/cqW3UC/cFkqVW+HqpHGmuZdj2tSkonBvUF5BafEz6l ShntG3wgtRtb+3ztWEQajPvUD8J9mHFTqD7YziPc2tocTgSXNYnwX3ozGc3W+Y00PK3o Z7HlUUWuYcV9+X1O0FoXU0PbbRMnMtS+uTIT6Ni88bjRud7A2+d9hd8rbAsQzZOf3cHe rETlWCficjFVsgLLpb2bGR63PsLxMxd7dT1awYltAPZodU0Emo28RL52kfY99rZ21d2m MEiznchPWDcRQFLgW4ht+CtJMdBcoLYOz8TrRITM6HUm4+/4FU74Panijgwpc7kLZnGv l5lQ== X-Gm-Message-State: AOAM531OpT3SExzIckUpbyfv8xqT2aA7csGKDd3VPAVMrNXukXNvLAcm uuAMYUcOnZ1r9fnHxbXI9c11McTm1nd5/VsihaZRmjNmgKhYyD83qEAbB28/IT5xUpdgQsTckiD +Vw2L8Ul6pNU= X-Received: by 2002:adf:ee0f:: with SMTP id y15mr34182293wrn.76.1593064419357; Wed, 24 Jun 2020 22:53:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5hXGFY3NA9jZVCbIISwv3TbpYhel5ZeXFLWogioG7Fu9BtfYO7azSJNaCynxpxnD7oj6ImA== X-Received: by 2002:adf:ee0f:: with SMTP id y15mr34182274wrn.76.1593064419144; Wed, 24 Jun 2020 22:53:39 -0700 (PDT) Received: from [192.168.3.122] (p4ff23f47.dip0.t-ipconnect.de. [79.242.63.71]) by smtp.gmail.com with ESMTPSA id d28sm32340485wrc.50.2020.06.24.22.53.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jun 2020 22:53:38 -0700 (PDT) From: David Hildenbrand Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] mm/spase: never partially remove memmap for early section Date: Thu, 25 Jun 2020 07:53:37 +0200 Message-Id: <4D73CD59-BFD5-401A-A001-41F7BF5641BA@redhat.com> References: Cc: Wei Yang , Michal Hocko , Andrew Morton , Oscar Salvador , Linux MM , Baoquan He , Linux Kernel Mailing List , David Hildenbrand In-Reply-To: To: Dan Williams X-Mailer: iPhone Mail (17F80) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 06E2D1AD1B2 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: > Am 25.06.2020 um 01:47 schrieb Dan Williams : >=20 > =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(). >>=20 >> Hmm... This means we need to adjust pfn_valid() too, which always return= true >> for early sections. >=20 > 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. >=20 I prefer the easy fix first - IOW what we Here here. Especially, pfn_to_onl= ine_page() will need changes as well. At least my ack stands.