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 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 5EB46C433E0 for ; Wed, 24 Jun 2020 23:47:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1B37220738 for ; Wed, 24 Jun 2020 23:47:31 +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="IOqtxZqb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B37220738 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 7FA5E6B0002; Wed, 24 Jun 2020 19:47:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7AAEE6B0003; Wed, 24 Jun 2020 19:47:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6BE6D6B0005; Wed, 24 Jun 2020 19:47:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id 52B166B0002 for ; Wed, 24 Jun 2020 19:47:31 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CECE3824556B for ; Wed, 24 Jun 2020 23:47:30 +0000 (UTC) X-FDA: 76965744660.23.badge34_5b0fb8e26e48 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 9570937608 for ; Wed, 24 Jun 2020 23:47:30 +0000 (UTC) X-HE-Tag: badge34_5b0fb8e26e48 X-Filterd-Recvd-Size: 3966 Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Wed, 24 Jun 2020 23:47:29 +0000 (UTC) Received: by mail-ed1-f66.google.com with SMTP id e22so2769030edq.8 for ; Wed, 24 Jun 2020 16:47:29 -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; bh=4Fvdsiz8MkdsVL2lFPEcvvla/ra3rq7tEtUzSg1iTxM=; b=IOqtxZqbihUe4NvFtQ7g5qCSWj8O1LYkVEuxXmcx7dHb4dYyDa8iAUfuh0i7p2GGkV ujBwdaGwcX63sAQjzq+Si9yp9Db3wkCa/Lb7FZuHkD0kofSwJKZF8YFC7F73T6nwmANU N7YkcpDdMnA2oBJbSlfeTqbxeS9/iXdZyMFJP/f1rfGicLsgwtAq763avr7uQnJFmVWW 9uF/KIOnWchdRqfQzo8geoUqkLEanZer5/kccG4QPofmpB2bLHD9RIUAVOaaaM47ntSH WLK3eKki5Q5S7J/fmjlWULSqZ1ZeO7EdROH8VvshTht+VAy2gLNGZu8kjxw1xhh2zStY hR8Q== 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; bh=4Fvdsiz8MkdsVL2lFPEcvvla/ra3rq7tEtUzSg1iTxM=; b=j7BDwbPtjIuLAeAMPkRhF+OtkJlY8Pyeuua/S1yaI738lTef3cux08yzC2SvOqGvsp m6wVV17IvDzsTlpVMN3EO1GUPUKye5XR45eCDMb1cT8IfwnT0Pxpr5HpZKlCLW36oAon sSHNxUzOyri+5aCP+hdyO0UfnMh4sYs6+OdRLScwbRj4JBxh09AUrnnCTskYGEsFSlfd 3KR1D9ku6dsUACgH4VkmAPZyVa9OTl0RBfC48MZTqLQx29q4nXp7lQlWbFt4CT6rH1NS dSmwQ/QpXgzBJUvv0tGw72CY7C8Z1LHcn4aO6NGCivIEHr5WwzgfvVGeh3+k6gl6kL0t HskQ== X-Gm-Message-State: AOAM533peBcJ7mwfGitwKwEu3EKe9UssE2Vs5iMKah1l6lhG8mu4e3Y/ jXn+rbMiGQh2G0oygDtx6WhHmZkD0k9+4xs4W38bRQ== X-Google-Smtp-Source: ABdhPJxbo2NKGbxKrMC0oomx6UxUfdokYoRowgva3p9GbPKrR0Y07IbrBNnZTSvmoU+o5BxWQjKJJIAA1KBN+5nJ+8E= X-Received: by 2002:a50:d9cb:: with SMTP id x11mr14314671edj.93.1593042448202; Wed, 24 Jun 2020 16:47:28 -0700 (PDT) MIME-Version: 1.0 References: <20200623094258.6705-1-richard.weiyang@linux.alibaba.com> <20200623151828.GA31426@dhcp22.suse.cz> <20200624061340.GA11552@L-31X9LVDL-1304.local> <20200624220552.GA15016@L-31X9LVDL-1304.local> <20200624224410.GD15016@L-31X9LVDL-1304.local> In-Reply-To: <20200624224410.GD15016@L-31X9LVDL-1304.local> From: Dan Williams Date: Wed, 24 Jun 2020 16:47:17 -0700 Message-ID: Subject: Re: [PATCH] mm/spase: never partially remove memmap for early section To: Wei Yang Cc: Michal Hocko , Andrew Morton , Oscar Salvador , Linux MM , Baoquan He , Linux Kernel Mailing List , David Hildenbrand Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 9570937608 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.003489, 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 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.