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=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 1A899C11F66 for ; Tue, 29 Jun 2021 05:35:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D5B0A61D54 for ; Tue, 29 Jun 2021 05:35:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5B0A61D54 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To: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=82qRukdtwHUJZgExxrk9tzc1fAY1xLwH1ZGTcn463G8=; b=i1gPvtQF24uO4c ow603Q959PdIkUB9E/2/DTtjD2HSNt78gdR+l40M9VluWPDiUmIswNLUSCzacASuKop2oPd14e5Sx vmsML8P6zaDrkBt2iNwm6rpvP+OMtVAFsdyXjzTJ0n/HIPCJ+b1g/1BXWpqzfYl/KDN5ppj6QuKBS zuCmw3LwsJM6mr7B4VhtGXs/BKqjxXRiLGmYfq/t3bPjhHwNX2fptGELxvGB4IIJG9Ct3L9Pgm7HP 3L4Xy28wXJMZLdotZ/QbkP/46msFmEJjdBMDtCsDJvfpH8hWWV1NCzsFrCOY/PQYERuVnz3KHh/58 9in6zVLMFeKz24mm5ipQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ly6NZ-009pIM-2k; Tue, 29 Jun 2021 05:33:49 +0000 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ly6NV-009pHb-2v for linux-arm-kernel@lists.infradead.org; Tue, 29 Jun 2021 05:33:46 +0000 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15T5Wbwm075810; Tue, 29 Jun 2021 01:33:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pp1; bh=c+QcLwyzuhHTf5I8zGgSlFAcCqO425eu5Ou5RyI6z1w=; b=JBrvUJg1VpDTOuj0bfgaxb5Sqd/lPATTflP6EMviKcZ8FPrpuo5JgCqUqRk2hd57wvFf BA/UojvnqTSFRkbesQZF0xdIRvsIa5ikG6cVxkqxKm47CplC4r3UV8WPnMkhl4hIlqP9 EZQBEFiJtXcr0eNTgCNCn+IRjc+oLyq0eCQZLxqDAqb0Y9ki/142gxhrzzJDOvyfayBA blR0YUAWgBKMelO9IKRkmt2DYwh+VTIMJhAb3L4WweBzSK9Bklhr3ptJCsY6WyegivLy SAHPQshbZv4lLzsy1Jm5N0eK7RoXB0OS9L51J1dEVz9R0z1g1NWwJFxNah122AFus8kl Eg== Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 39fu6etpvq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 01:33:20 -0400 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15T5XGJb018042; Tue, 29 Jun 2021 05:33:17 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma04fra.de.ibm.com with ESMTP id 39duv8gjk6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 05:33:17 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15T5XEhI18874718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Jun 2021 05:33:14 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8EAA3A4057; Tue, 29 Jun 2021 05:33:14 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2E886A4055; Tue, 29 Jun 2021 05:33:13 +0000 (GMT) Received: from linux.ibm.com (unknown [9.145.176.236]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 29 Jun 2021 05:33:13 +0000 (GMT) Date: Tue, 29 Jun 2021 08:33:11 +0300 From: Mike Rapoport To: Tony Lindgren Cc: Mike Rapoport , linux-arm-kernel@lists.infradead.org, Andrew Morton , Kefeng Wang , Russell King , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-omap@vger.kernel.org, regressions@lists.linux.dev Subject: Re: [PATCH v2 3/3] arm: extend pfn_valid to take into accound freed memory map alignment Message-ID: References: <20210519141436.11961-1-rppt@kernel.org> <20210519141436.11961-4-rppt@kernel.org> Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: kaGobwy-r0q0GzCYD3kf90Twx11wiU93 X-Proofpoint-ORIG-GUID: kaGobwy-r0q0GzCYD3kf90Twx11wiU93 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-29_01:2021-06-25, 2021-06-29 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 bulkscore=0 clxscore=1015 malwarescore=0 impostorscore=0 spamscore=0 priorityscore=1501 mlxlogscore=999 suspectscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106290039 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210628_223345_382941_A75D3F44 X-CRM114-Status: GOOD ( 20.65 ) 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 Mon, Jun 28, 2021 at 06:26:26PM +0300, Tony Lindgren wrote: > * Mike Rapoport [210628 14:07]: > > Can you please send log with 'memblock=debug' added to the command line? > > Sure, log now available at: > > http://muru.com/beagle-x15.txt Hmm, no clues yet :( Do you have CONFIG_DEBUG_VM, CONFIG_DEBUG_VM_PGFLAGS and CONFIG_PAGE_POISONING enabled in your config? If not, can you please enable them and see if any of VM_BUG_* triggers? Do you use FLATMEM or SPARSEMEM in your config? Let's try seeing what PFNs get false results from pfn_valid, maybe this will give a better lead. diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 6162a070a410..66985fc3e730 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -126,10 +126,16 @@ int pfn_valid(unsigned long pfn) { phys_addr_t addr = __pfn_to_phys(pfn); unsigned long pageblock_size = PAGE_SIZE * pageblock_nr_pages; + bool overlaps = memblock_overlaps_region(&memblock.memory, + ALIGN_DOWN(addr, pageblock_size), + pageblock_size); if (__phys_to_pfn(addr) != pfn) return 0; + if (memblock_is_map_memory(addr) != overlaps) + pr_info("%s(%pS): pfn: %lx: is_map: %d overlaps: %d\n", __func__, (void *)_RET_IP_, pfn, memblock_is_map_memory(addr), overlaps); + /* * If address less than pageblock_size bytes away from a present * memory chunk there still will be a memory map entry for it -- Sincerely yours, Mike. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel