From patchwork Mon Dec 11 16:22:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13487538 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 9CEE2C4167B for ; Mon, 11 Dec 2023 16:22:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 222116B0162; Mon, 11 Dec 2023 11:22:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A8AA6B0164; Mon, 11 Dec 2023 11:22:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 054D96B0165; Mon, 11 Dec 2023 11:22:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E44B16B0162 for ; Mon, 11 Dec 2023 11:22:44 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id C069A1C1003 for ; Mon, 11 Dec 2023 16:22:44 +0000 (UTC) X-FDA: 81555055848.24.1D11859 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf14.hostedemail.com (Postfix) with ESMTP id 2AF9710001C for ; Mon, 11 Dec 2023 16:22:41 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="J4zVxej/"; dmarc=none; spf=none (imf14.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=1702311762; 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:in-reply-to:references:references:dkim-signature; bh=kIcEVcsVYWLjUXGY0/7qrAb8qfK+YJ2xz3XG2UcayEI=; b=6dUxr0WpMSuNOYynja+XTcRTE0FgRD/R/SaNcZGgVJetakK9+z4tru7pWmIvAPAwN4kTrS iRjavmGzt5J0oORmCDGNKOdsbhvtWIQVxZd5RYEypM+3GSuFOUbz+UEjiaXjc9HuKLb5TA 1KJpzh3EyX/vPR13rpDTf1NaclRISg0= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="J4zVxej/"; dmarc=none; spf=none (imf14.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=1702311762; a=rsa-sha256; cv=none; b=aeHgZzAdBQrXK9BzXqFkvsRtt0JPpZXhezOFjhWRPv46ulgxavQWF2RgezN98Wq6VG5v3v aIqpLCGqX5UH57wzT/9SKKWtpivNompstC2RwggrHvL8Rz5YSDx6odW1qc5Nm8NgEf95IE JRI11Rlbj8tV+zWnI+BH3P4tTCqKSQY= 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: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=kIcEVcsVYWLjUXGY0/7qrAb8qfK+YJ2xz3XG2UcayEI=; b=J4zVxej/e+/3h1Q8YXWsGB+T5O G0mSywZOq1kYrbz+zFdzN0BPvmJcNGeguqqNCd2bdCGQ/Sem09mXP8VonTrsKM1dDi9ZgY2S3RX+r wLrbdWZiUN36KeZ4o7WQbA0ar9FzQcwyU9ykfiiypRKArEgw4SzhEIaHRlmGrv0TFVglnxiDqpFRo 41zrlc9GB7Gau7AmikiM+lmDpgNHCmEJZ+eEpgNWzLnTZCmS17otezi4DeA1WpMvbDqVmdCjY5KnY wHMyQaRzSivC2p4muUlDNbnJIja/tpvAYNjEANmYM4EzFhiPpM26mPh1PZZ/ByOHPg4VwLZ7Z0NDT mqr1M3+Q==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rCj2u-0090JR-C4; Mon, 11 Dec 2023 16:22:16 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, Ralph Campbell Subject: [PATCH 5/9] mm: Remove stale example from comment Date: Mon, 11 Dec 2023 16:22:10 +0000 Message-Id: <20231211162214.2146080-6-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20231211162214.2146080-1-willy@infradead.org> References: <20231211162214.2146080-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 2AF9710001C X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 3zy17gzna58151bb4nur8injj7xspsec X-HE-Tag: 1702311761-595092 X-HE-Meta: U2FsdGVkX19+0xBRn+rYAOZqM0FmtKJsMw2RAg9H2R4pmPGqG1/1fehNj5SnTaCcfQUKBhS3k+gLuhstp5ugtRoChuloA6rslWxio2uJ7qrDUw+ManqlNipxe0VVXwoFklnTgREZhf681hceto4mhK24kH9DTs2bamRnOKXITUmu8tiqbEkXJlW1njXq3fgixra+WurpA2fmLUt27qtljUbpAM88urOkFrGsN4IgwIYmFBzUoyk4pM+K2LYbXCMqDJemNbiD3Nx/3QttajX3QJ3VuAP+06tan1D536teh41DF4c9zn4f3/K1kYkqMlNWXR5SuhaVGGNhgLicBo2yzb7zFR/xvuzQX/ZpbYrCk2pdqs/5QBfFtFzePqDQBKOkdE4IRHQtCtFOBsaW5SEB9fz8tHWeVhcNA2neSDDfL1fdCI77n59vUoo72pFqRVToUbRZkn0qC7XzmI3r3EAILrHlOBCNbwXjcqTZevOewbiLCDB4/umrg2YOEiTJEoHyGDAUGlo5wHxjKc4f1tSd8kgiVVcoGw9srXNZS+f+lmhysLseMQbbk1QejyGaDqoDDvWwQxdjnZ2QAgMeEIraQ2ubrNWPD9zdnBUX7LSkkSWE65vci8E+ZnTjG9Mj+64x8rOZwxJBpGVFaJ3RNj7hs1dK3Vrat632iPO2Py7bKrr1rbsr2MGy6XsQTZgAnQQu71mhQE/uJl/ZEQmtDMwGAe0XpNxeTDw/9pKORdM1GUbD+2/UPqiGaZ+fBBGs8WjUZxVOatHHWa1TsMPN7Y58LiZamOA2CSarKiaOMeAl8r/QQSaxDdJ+G9JGdKYxhovMu49XIIcx8CKeEJzt+FPWh6lZfsUZkpJKEWan7Up3A/4TlPW+zy0VvdmHEhBF7CPPUDyukmFN720o7iQHR4k/Ut4tv0iCu/YCjLI94Q+Fsu/vLmI5hvnTFHQMKy+1YaRDOqFLuADDXW/6WNND8oX xPkssofX M0iqTFu8NQIgNiYyQQHjdeU2EoqYJZaZ1r0yqfYiPYMRlc2pJj0juj5LtmmaPBwsSAHfQ+N4sjCNN3ZbUiBrdRKTxGcw+Kdr/hJP2Tw87UrxGi00/Y7jcw8LS7yPEkCTca29cero6lxeuAz3lwC+s7YX+Q346R2iNGDBBrKTsKRBQp6wM3ipmBvrPLcQcTKrMh617mm0IExi9frY= 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: folio_add_new_anon_rmap() no longer works this way, so just remove the entire example. Signed-off-by: Matthew Wilcox (Oracle) Cc: Ralph Campbell Reviewed-by: David Hildenbrand --- mm/memremap.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/mm/memremap.c b/mm/memremap.c index 9531faa92a7c..9e9fb1972fff 100644 --- a/mm/memremap.c +++ b/mm/memremap.c @@ -473,21 +473,11 @@ void free_zone_device_page(struct page *page) __ClearPageAnonExclusive(page); /* - * When a device managed page is freed, the page->mapping field + * When a device managed page is freed, the folio->mapping field * may still contain a (stale) mapping value. For example, the - * lower bits of page->mapping may still identify the page as an - * anonymous page. Ultimately, this entire field is just stale - * and wrong, and it will cause errors if not cleared. One - * example is: - * - * migrate_vma_pages() - * migrate_vma_insert_page() - * page_add_new_anon_rmap() - * __page_set_anon_rmap() - * ...checks page->mapping, via PageAnon(page) call, - * and incorrectly concludes that the page is an - * anonymous page. Therefore, it incorrectly, - * silently fails to set up the new anon rmap. + * lower bits of folio->mapping may still identify the folio as an + * anonymous folio. Ultimately, this entire field is just stale + * and wrong, and it will cause errors if not cleared. * * For other types of ZONE_DEVICE pages, migration is either * handled differently or not done at all, so there is no need