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=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 40013C433ED for ; Tue, 18 May 2021 09:49:59 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5262613F2 for ; Tue, 18 May 2021 09:49:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E5262613F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=a/g60IQH9mBqzXynPPzxDZxex2RSsSUc+x/rFbemF2Y=; b=OcQOnN7SC5np1R1eZYzKQr0a1 ueS+Z2j5yWZFu5fmcU3iI1IjF4nMaP+tLQ3k1BQTS/f7J27nJnd80tbv5e6gt3i33O5i6Rs//98v1 jyDJtBCbc5dqq/VXQmsr1P97RMCDhcoR4/QoP8Ylld8jQGfliBmY2iCWyj5X8cbBCQewvebMh+WG+ Vndp0w7a3E7Gkurflc8uRjWsozQO8TASBATVEmIuVv7+N+EYzs8QeKYuo2TPGx4zH0DUoBV4mQzpO 4Z9+Sq1eGHAS4vwdn8WpciAUE7aJ5W3tIgmABNQPE547mQcPO7aTY61M6Oz6t7pAv3sFbbVROEbUR 5mNYkxa5Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liwKK-000DmE-9d; Tue, 18 May 2021 09:47:48 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liwHI-000Crr-Ro for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 09:44:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=qfku/C/ExMDL6MsQW+4VS8Zyso0vOR9HeqIIBWxXDsQ=; b=SxV66BirKJv6Rfl54m5IIV1r5I WS3X2UhTQPtEiKb6dOk0/ib20E//yT1ukWNXpvz2DCKt2+I8wx1M3Xi+pxWQf+PpFcDeN07Wy+2Ra QDu8ZUHrwlC2eP7n2dmWl5Z1YreBibwMqWy45B1GUlybVYxvENs3jF+Ngwmy91w+D8ViMhCKx/aug jpySrLOf3U6N4Dg2Md/mnDFfBof4SWZcnI3A2efdEzx2Fc3N8FpCeRAGDrTyVsPU3Ot+OscFNv+HE qEilUFP4fi907T7Wyz1I7S90BOgqiq7svqKlylSNic5/CUYJyyjOm0NrDMhDFxTB8OPW/TIvj/RUN 59r/qmag==; Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liwHF-00EWRy-BQ for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 09:44:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qfku/C/ExMDL6MsQW+4VS8Zyso0vOR9HeqIIBWxXDsQ=; b=aT7kvUX4ZgWiC2MZBAYrVFoRr Vph8pBGByIX51D+IxTJu2yu3C0QakB/JSogfuy+EbjG05Pn2CsvAqBplyiz4wIgj2x2O32yiEh0Dm e40eMr3CJ3yo3u2ePLEppfnQk3Ywgbj0DyOEdSsmqYc7Mhfd26GNE8XqygVja3GZUGO+BE8FfVpe0 trorCvz+swJuaa2kW6LJJx+zTLJDboFQn3eOSJ47YYswMvp5GzR/UZAWI0kHKiGMP/LuuEAye092v NY7Ga/oY+e1wUGJiCKZ97qNw7Bxg9W3lts01UyJeKv6fO6l2yzYRMBMB3tr9E/6umHhb4gllOPXOh gvcce1yhQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44120) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1liwH7-0003z6-Be; Tue, 18 May 2021 10:44:29 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1liwH5-0007mk-5D; Tue, 18 May 2021 10:44:27 +0100 Date: Tue, 18 May 2021 10:44:27 +0100 From: "Russell King (Oracle)" To: Mike Rapoport Cc: linux-arm-kernel@lists.infradead.org, Andrew Morton , Kefeng Wang , Mike Rapoport , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 3/3] arm: extend pfn_valid to take into accound freed memory map alignment Message-ID: <20210518094427.GR12395@shell.armlinux.org.uk> References: <20210518090613.21519-1-rppt@kernel.org> <20210518090613.21519-4-rppt@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210518090613.21519-4-rppt@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_024437_409677_279EEB4B X-CRM114-Status: GOOD ( 12.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 18, 2021 at 12:06:13PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > When unused memory map is freed the preserved part of the memory map is > extended to match pageblock boundaries because lots of core mm > functionality relies on homogeneity of the memory map within pageblock > boundaries. > > Since pfn_valid() is used to check whether there is a valid memory map > entry for a PFN, make it return true also for PFNs that have memory map > entries even if there is no actual memory populated there. I thought pfn_valid() was a particularly hot path... do we really want to be doing multiple lookups here? Is there no better solution? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel