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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham 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 4C7A5C07E95 for ; Tue, 13 Jul 2021 10:24:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F1C8160FEB for ; Tue, 13 Jul 2021 10:24:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1C8160FEB 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 1E12E6B008C; Tue, 13 Jul 2021 06:24:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1921A6B0095; Tue, 13 Jul 2021 06:24:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 00B086B0096; Tue, 13 Jul 2021 06:24:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0067.hostedemail.com [216.40.44.67]) by kanga.kvack.org (Postfix) with ESMTP id CC20F6B008C for ; Tue, 13 Jul 2021 06:24:48 -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 C7B4F82791B9 for ; Tue, 13 Jul 2021 10:24:47 +0000 (UTC) X-FDA: 78357181014.19.FC81AB9 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 707B930002C8 for ; Tue, 13 Jul 2021 10:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626171886; 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=JvbuSZrGZ9Jk3BD9ASj2i3CbMWG+JLthLiSXwWolRg0=; b=Y9pv05D7IORlmkMwZbxd/VrP9JlMXT/qfnAcHVv1lX7C+HW9IMk7pEl+bSsu5LF7dNpH7P hOEkOB/lSlzRW/aFTMp6ltLiHd2+8hTgr7It6rCPPd7VqCeccozs0tDJ9FWF2GIr4lFe0u /6v95L6Y5QWmaiQeF5uJKZwcivAO/Zk= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-282-eosbkoNmOnal7q3DrMSdcA-1; Tue, 13 Jul 2021 06:24:43 -0400 X-MC-Unique: eosbkoNmOnal7q3DrMSdcA-1 Received: by mail-wr1-f71.google.com with SMTP id 32-20020adf82a30000b029013b21c75294so7319336wrc.14 for ; Tue, 13 Jul 2021 03:24:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=JvbuSZrGZ9Jk3BD9ASj2i3CbMWG+JLthLiSXwWolRg0=; b=oDU+Xb/B0oY1r9VrQirba2yEhyGTc/cHppgufM0B/HFaasKK9PDCVdgWfkcSCezrEP udQIrUVBFGBBljoOq1CRL70ZVFP0ZubCjRfCricoSf858GL6KOVuQfVatKloXdUVdeUw Itk7/Jiu2BPue9ZUsJzGANqJg+7NQHr62MEo2CRkPPVmcYr1h6vyEQHGjEOE/+SeK0SS OSVEd2eJtSySDdbmjxigma4fdJ/cnaldwTKEypzwDhthlXciasn58OQCDDLZBnguEzn4 6YzUxfzMDzxCenMgrEMp1lbsnDRMCfvuNRJvljSrxf7MyRvVK1+X5III/ooqIYWQkJRa 9xcQ== X-Gm-Message-State: AOAM533R6kNtOd89Zb0d2dKvzMblNOcLtB4/SuuDCUqTuW88hD35U+IA EwvYqr15PK+XaEvnvhnnwbdNUnvppOCqSzU2Sxn3TQiQsAzfvfLQ/mGHvO+A412nHhbWmGEb/40 jZ2ZzfooZ7kBFDeF/AbD23821TuRgju1bei2H9xJkGUs5PHsFPIDOIclQ87Y= X-Received: by 2002:adf:fac7:: with SMTP id a7mr4715912wrs.384.1626171882460; Tue, 13 Jul 2021 03:24:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPBC3S8XqrN/M3kx3rNVsTpnqRoze7fkOO2hnGdgl7MEbRTdlY3uI8kf1MQIEw69FaSCJplQ== X-Received: by 2002:adf:fac7:: with SMTP id a7mr4715893wrs.384.1626171882305; Tue, 13 Jul 2021 03:24:42 -0700 (PDT) Received: from ?IPv6:2003:d8:2f0a:7f00:fad7:3bc9:69d:31f? (p200300d82f0a7f00fad73bc9069d031f.dip0.t-ipconnect.de. [2003:d8:2f0a:7f00:fad7:3bc9:69d:31f]) by smtp.gmail.com with ESMTPSA id t22sm15773085wmi.22.2021.07.13.03.24.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jul 2021 03:24:41 -0700 (PDT) Subject: Re: [PATCH 1/2] mm: remove pfn_valid_within() and CONFIG_HOLES_IN_ZONE To: Mike Rapoport Cc: Andrew Morton , Greg Kroah-Hartman , Mike Rapoport , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20210713080035.7464-1-rppt@kernel.org> <20210713080035.7464-2-rppt@kernel.org> <7300dfe1-0c6a-ae2e-2c48-c885248ec263@redhat.com> From: David Hildenbrand Organization: Red Hat Message-ID: <4367d5e4-4f03-6d99-f19b-9d32b71f227d@redhat.com> Date: Tue, 13 Jul 2021 12:24:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Y9pv05D7; spf=none (imf03.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Stat-Signature: y5qc74pb3bk5yy9aq6zrkx14s8a98rxy X-Rspamd-Queue-Id: 707B930002C8 X-Rspamd-Server: rspam01 X-HE-Tag: 1626171887-817133 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 13.07.21 12:22, Mike Rapoport wrote: > On Tue, Jul 13, 2021 at 11:51:46AM +0200, David Hildenbrand wrote: >> On 13.07.21 10:00, Mike Rapoport wrote: >>> From: Mike Rapoport >>> >>> After recent changes in freeing of the unused parts of the memory map and >>> rework of pfn_valid() in arm and arm64 there are no architectures that can >>> have holes in the memory map within a pageblock and so nothing can enable >>> CONFIG_HOLES_IN_ZONE which guards non trivial implementation of >>> pfn_valid_within(). >>> >>> With that, pfn_valid_within() is always hardwired to 1 and can be >>> completely removed. >>> >>> Remove calls to pfn_valid_within() and CONFIG_HOLES_IN_ZONE. >>> >>> Signed-off-by: Mike Rapoport >> >> There is currently the discussion to increase MAX_ORDER, for example, to >> cover 1GiB instead of 4MiB on x86-64. This would mean that we could >> suddenly, again, have holes insides MAX_ORDER - 1 pages. >> >> So I assume if we ever go down that path, we'll need something like this >> again. > > It depends whether pageblock_order will be also increased. PFN walkers rely > on continuity of pageblocks rather than MAX_ORDER chunks, so if > pageblock_order won't change, there won't be need to check for pfn_valid() > inside a pageblock. I'm pushing for letting pageblocks stay untouched, so good to know! (we still have this crazy special case of pageblocks > MAX_ORDER - 1 right now, which I think we should just eliminate) -- Thanks, David / dhildenb