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 8AFD5C07E96 for ; Tue, 13 Jul 2021 10:24:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7450161166 for ; Tue, 13 Jul 2021 10:24:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235496AbhGMK1h (ORCPT ); Tue, 13 Jul 2021 06:27:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50386 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235143AbhGMK1g (ORCPT ); Tue, 13 Jul 2021 06:27:36 -0400 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-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-97-A52O3RR9MnC-uspE7CGbNg-1; Tue, 13 Jul 2021 06:24:43 -0400 X-MC-Unique: A52O3RR9MnC-uspE7CGbNg-1 Received: by mail-wr1-f72.google.com with SMTP id t8-20020a05600001c8b029013e2027cf9aso4471289wrx.9 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=hzeer8C1sycxPPueGDF+0ubrOi4VnHlPV2+Bk+XTl0pdG4crQ+coSLrc81k9AxFfGG ZUaabjV5ZKhxRWnLoGtMJR83aeA6Bes3wYyuRfqNsdNf+u0/h47olMCsCHS72yw0HLaa r2lH1GzxviCrQPm7V4urjmRgpGdCkdAlfK7b6ajQ0YM6mSgJksqvMIlNkOOU5JzQSsK1 TzAiZc2Gi+yE64rfqKqRWDb5+1XHNg9+/ueyQdLgm1lJ0kDsvPx+FbK1enREmVkqj3uk u0SNvgUCLgyKIEwlwMlBYQAxFNvsErBn0jsSv2EKMkBRuyPm88h9+S3cBf8WtFwE7knF CGUw== X-Gm-Message-State: AOAM530icaPTPP+c5TpH3ndL4ljGCGbJUbfXs79xB0BcPXWsj+bq8BJ4 pFINj+VdfPxypoVy+2o4KnzhioqATZLpJobEbMbUqrZlVO2SrJo9EJTTzjRy8v6mNi7V7vnu4w5 cllBtzlY1oQV+ADE4zZz8Io2z X-Received: by 2002:adf:fac7:: with SMTP id a7mr4715904wrs.384.1626171882436; 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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