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 AB1CAC433E0 for ; Fri, 26 Jun 2020 04:59:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6B28D20768 for ; Fri, 26 Jun 2020 04:59:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XF2301I9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B28D20768 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 E42896B0003; Fri, 26 Jun 2020 00:59:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DF1126B0005; Fri, 26 Jun 2020 00:59:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE01D6B0006; Fri, 26 Jun 2020 00:59:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B57CE6B0003 for ; Fri, 26 Jun 2020 00:59:20 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5141D824556B for ; Fri, 26 Jun 2020 04:59:20 +0000 (UTC) X-FDA: 76970159280.19.bike57_100809326e52 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 276BA1AD1B0 for ; Fri, 26 Jun 2020 04:59:20 +0000 (UTC) X-HE-Tag: bike57_100809326e52 X-Filterd-Recvd-Size: 5220 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Fri, 26 Jun 2020 04:59:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593147558; 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=6a6RLyipUaLXKjU1U7PvMxQvdvbewjYXYtwRGWrZn7I=; b=XF2301I9uI26sNWHmmEspv2vBc8AxNhYlA2QsAS/g3kHczTL4gu8nGaNUzxyAnk8ZniTM6 huTTeHejU1/fWyyH0NjC41Du47d+0dQLVDZOTeCtHnMDqoXotTfDUsI9AXbQep82Pt1Lje VwnaxahESkWmH5qsgc6zA+Ykm/igYMc= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-242-j07o0h9iOS2AFwcFNpZsWg-1; Fri, 26 Jun 2020 00:59:14 -0400 X-MC-Unique: j07o0h9iOS2AFwcFNpZsWg-1 Received: by mail-ed1-f72.google.com with SMTP id m12so5586468edv.3 for ; Thu, 25 Jun 2020 21:59:14 -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=nC5hQIPbomYodtg8E2eKGK2OslJrNc8ijS+OoKbuA3g=; b=SLVjfbdqN0P8zFZUJkeuoDrdnVUVdGCjwmNT9I4OyTTTmu+Tpl0JDSOIks18vvsdyT 2jWFsHRwPd41NtUy2taZ7PU1upMkNcHJZF4HbNOO5iVyPU2VJgmpnRQVj7Gf6q35MzSv Kk6DCtvJ/Su9sh4PY5tOOKZG77C1hD7kJETYqJchVoEx4bOgV+4Z4ePciukvDL9MXfEW Y0VqcBJ0CDc3OYbsKPRQtPnHmymGmxhTydD7WxiBFy+4RMHdgEhNcTQhJpmgW806LvYc Qkxxn8+u8WJigoSddtSUC9PnxGum1JXIhDrho0BEoYDB8y03xBrqDKCxCHD6x9w81gyq hs7Q== X-Gm-Message-State: AOAM530X/w1pODKG0zW/+dqY2n/W+oH6ZmmwiTh72yFOoBIHGE5TO0+l KwYcFA6/NjTY4imHgpmH7BS0rl+GV99TjB0IdPizVMpClRJqHMCNRTcSkUrAvfx1wJeGWe7Yz6/ gPHjuxWYHK8A= X-Received: by 2002:a50:ee84:: with SMTP id f4mr1495843edr.183.1593147553510; Thu, 25 Jun 2020 21:59:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx94lq3N/qM+1MWaVhHORkRbkIvC8QNtZ7Kv81w8Af0aY4pBglgBv3GcqUSklzjivfiZ3UGoQ== X-Received: by 2002:a50:ee84:: with SMTP id f4mr1495831edr.183.1593147553327; Thu, 25 Jun 2020 21:59:13 -0700 (PDT) Received: from [192.168.3.122] (p5b0c606f.dip0.t-ipconnect.de. [91.12.96.111]) by smtp.gmail.com with ESMTPSA id t21sm12887992ejr.68.2020.06.25.21.59.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 21:59:12 -0700 (PDT) From: David Hildenbrand Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] mm/spase: never partially remove memmap for early section Date: Fri, 26 Jun 2020 06:59:11 +0200 Message-Id: <5CA8ECA1-2360-4AAA-954F-931404EFEB2B@redhat.com> References: <20200625223952.GA17926@L-31X9LVDL-1304.local> Cc: David Hildenbrand , Dan Williams , Michal Hocko , Andrew Morton , Oscar Salvador , Linux MM , Baoquan He , Linux Kernel Mailing List In-Reply-To: <20200625223952.GA17926@L-31X9LVDL-1304.local> To: Wei Yang 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: 276BA1AD1B0 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 26.06.2020 um 00:40 schrieb Wei Yang : >=20 > =EF=BB=BFOn Thu, Jun 25, 2020 at 07:53:37AM +0200, David Hildenbrand wrot= e: >>=20 >>=20 >>>> 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 retu= rn 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 >>=20 >> I prefer the easy fix first - IOW what we Here here. Especially, pfn_to_= online_page() will need changes as well. >>=20 >=20 > Hi, David, >=20 > Which part of pfn_to_online_page() needs to be changed? pfn_valid_within(= ) > would call pfn_valid() to check the pfn first. This looks enough for me. Not for all configurations. For some (e.g., x86 iirc) it=E2=80=98s just a n= op.