From patchwork Tue Dec 12 16:48:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13489679 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 648FAC4332F for ; Tue, 12 Dec 2023 16:48:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E80786B030E; Tue, 12 Dec 2023 11:48:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E301A6B030F; Tue, 12 Dec 2023 11:48:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CF78F6B0310; Tue, 12 Dec 2023 11:48:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id BF31A6B030E for ; Tue, 12 Dec 2023 11:48:20 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 92C0EA0A46 for ; Tue, 12 Dec 2023 16:48:20 +0000 (UTC) X-FDA: 81558749160.19.E305A75 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf28.hostedemail.com (Postfix) with ESMTP id 53EE7C0019 for ; Tue, 12 Dec 2023 16:48:18 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=RCkslKMO; dmarc=none; spf=none (imf28.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702399699; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=SMPLDJ+v6wPTN3wMFdOK337SEgyJHNDcSEf/BB0pN5Y=; b=Xh1eAmoKveIq5C5iRwAkhinQB3v7vFC4iXOwBkZl0B2RU1xYc+DZbeFdTTkdvexRlzbu+4 JUrA2vksiok24NDdulQe8w/bAfSct3GBo3sOPETsMLVWCOhOmfyqsXnde9YWSICl2QSOvm uiymqpesz1oenh/5tezteOMyxx41Qag= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=RCkslKMO; dmarc=none; spf=none (imf28.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702399699; a=rsa-sha256; cv=none; b=GS1qfMgaj58vmmG4bI4qymmqsan9bd+IhQSpgGXHHZD3+t9pz4goUZL8nCB2HaiVJdR8ah EdrkQRG2xlFrVumgUQodQvmUvCo3r6Fizo2wspIgWxOObR4po0tk+0xD71yBX/uvvJjw62 5CN97skDu+ZEuVwWfGQy93Z9SRiFv60= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=SMPLDJ+v6wPTN3wMFdOK337SEgyJHNDcSEf/BB0pN5Y=; b=RCkslKMOv6WxZPrp8EJI7UZenD LlIuB17nRfrXSp78VqWSCNZEQh8kQDgN/X+Xp7Jl1EXmbK+S2M0OXqYxu6zeXeZLqbgdnbOFi2zZQ K4nMBJd9xqWcN0aw7qCY7jm54lP5W2Hr4KE4aZdA/yq0ZoyGKvNUBzSMJX2p+PBLys3ianV6UMFtW +LVZbrbh7xbqgrhU1E54lTue/LkEy7GCt/99VMfWWico8Nk2mAquba71FzVILqxzPzWZbpxYI3oMe Gd/L8xSQgs6RCEybfIFzp05IRIewMrDQBz3osdh2ql99X8hyVxxsJx5Hn8BkE2+p08Gxis5xOWLC1 g54M7Kbg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rD5va-00Aeno-SA; Tue, 12 Dec 2023 16:48:15 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, David Hildenbrand Subject: [PATCH] mm: Remove PageAnonExclusive assertions in unuse_pte() Date: Tue, 12 Dec 2023 16:48:13 +0000 Message-Id: <20231212164813.2540119-1-willy@infradead.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 53EE7C0019 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: rbf3467iahrbegp9ump9uxxkynbcmnnb X-HE-Tag: 1702399698-669967 X-HE-Meta: U2FsdGVkX18+cyEDLNX4l6PLPe8tkrRZWCO5Mnfqzei7npWrmSH7AGPSmq8Z6GQmSdcY8zCASuQJ0ldzFcIIxhOgENUmpEDLf8SqvsGTHhgrcUjVBLEQQFKwMPop97jCR9kwq0UmzHL625XzT98w1PrCYpybEhDplaMHHuf1JMZfQ5Lg74YsEqNqrBV5RPVgMEIUNTvNDGuOIAN5QrXeTRthdT5vzsEDIozXOh6H7rhQviMDeLn3wz9vOa/k3yz0YWE2UXiykP6iawIF5fzAf5nzZiV3LREEENOWKHPBHeblVW0qiIzUF+1n/klwdssbk7geRfAQhC4glvYpy5wreCvU4DVMdvnKGBX3HUuj6tRvcxdBuB49UYNXp9ZHAs3Hxzp7j0QQ+XmuHn0F6/xzcYQsoGKt3DXdpccE6X2yjKvL847cnDvkR3YZxV4y7LRnsRAG9Qr+G+cosBXHiGYULAFdoayHUOaHG8Ya81fCbozkLtE/gMiVKMrXV9m4zHK5f7EhGWnLFrSUipSf4p9fD9dNB9x5Qy0YAehYS+stpjBgjIt/QtnXusIfJVlUdthfGeciK/kiXcgOfrW8NeSWvo2GouyIVLc4XIbVNvqJ0e7uT8pylbqaEu0guooNleOkeZDsRFE5+yXhRCxRpU1pkB2RPvYfa1WmFlAkXILoxEqhzrPQhf8L7fmgu4oyOYxcFRriC/+En1tW6+3YgMSnd5MG9i7a43uQRzehJ+jVxLfclbGsi1/JALySeYc1uduSBapkxekc0qYH2Yc76lCBleIdNAQ2+0nMWlD1igPwnGbQzFnOlhlxX4t/hhveMMB+eCaflrQJHKTk2I/oNR5aBaNZZ+wQZYJAQey9NrjIdj4dkGpK8KOjouM2sFOKNP9wPw3z4fyAR816cVm86bCJEM9iM2jqljKQOjdnG9mR53Bbd/ZkNkM72yToDXf6F5vndwmSaiLLOA/JigCa4Di iofWcQ9Z kn7fACP6UFqHM2JAKJmGr5vu3CcDx4kZUgv6YI9A4B3TG/ss4j0aRddNlqHxF8vkeitvMpfSXH76hHlEvlc0utbbD4FJGG1PwwW3Pw4iSrOeMLr0JXO7J8eKnAD7FGQasbwQA4ibE/C23Wb84hgQZCWF/+NilZDrdqlFHW/VY0gnly7+j3/Z8aSC+p7UtU67oHmt3iyajpQVysX6js/VOVH1oUxaaxE9Nis// 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: List-Subscribe: List-Unsubscribe: The page in question is either freshly allocated or known to be in the swap cache; these assertions are not particularly useful. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand --- mm/swapfile.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index 0371b7b3cd27..85f9c355cb99 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -1788,10 +1788,6 @@ static int unuse_pte(struct vm_area_struct *vma, pmd_t *pmd, */ arch_swap_restore(entry, page_folio(page)); - /* See do_swap_page() */ - BUG_ON(!PageAnon(page) && PageMappedToDisk(page)); - BUG_ON(PageAnon(page) && PageAnonExclusive(page)); - dec_mm_counter(vma->vm_mm, MM_SWAPENTS); inc_mm_counter(vma->vm_mm, MM_ANONPAGES); get_page(page);