From patchwork Thu Feb 15 20:53:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13559142 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 C9E6BC4829E for ; Thu, 15 Feb 2024 20:53:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 182628D0010; Thu, 15 Feb 2024 15:53:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 130648D0001; Thu, 15 Feb 2024 15:53:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F15A18D0010; Thu, 15 Feb 2024 15:53:16 -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 E038E8D0001 for ; Thu, 15 Feb 2024 15:53:16 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 7E2D5805CF for ; Thu, 15 Feb 2024 20:53:16 +0000 (UTC) X-FDA: 81795238392.15.E7FAAA0 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf04.hostedemail.com (Postfix) with ESMTP id 7E58140017 for ; Thu, 15 Feb 2024 20:53:11 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=V+yUeLku; dmarc=none; spf=none (imf04.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=1708030391; 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=/0H9d6Xhry0qIaChaZvHW02I6nrPb5hRg1oAngkzFNg=; b=00dTDs0/h16x1lrhbDoUAnMYmbcllCGiErgtmIPmQMn91QjkDwDP5qTnBIOI5yoK//7CDq ZYwDBSLKVJKrPkCXZhQDQBUIdSisJj+DcjdCVc4qvGvwYyiSE5J4DELD/9sAUF902bkZoO ERfmvTeV89jiiQqqO/Whi+3W79rRPaw= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=V+yUeLku; dmarc=none; spf=none (imf04.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=1708030391; a=rsa-sha256; cv=none; b=UxyxTAjIZrTQuqEYleMWSEszvdYJdmA8onEshAxqMAuWWMdl5aqPDJz5d3Bl1bwwFgiH90 DKOcQfyozqsHhKisQAcMrRKwI0fHnrHqCN/tIDEGZc7u74pS75Y2HeXOCCIVdvbxlwuaOF 8LP4WoT/Nm4JIiEQoNqIvcl5qo6HWAc= 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=/0H9d6Xhry0qIaChaZvHW02I6nrPb5hRg1oAngkzFNg=; b=V+yUeLkue37gv4B7NNsnQM6PoJ UktjP675pjcdokkMiDNf5yjew2k/EgFi3g2M1BnX+Q7TyZN8i4K5ZI0zR5Hapngygzn90NgQ0xL3O wcZDHpZEiu98VFyPRtafvap6JyOXD2RUlC3iMEAfkmI7Go3tYjRymA649erk7JfNNF45+6SNfcZej aZePqPnWXQPgk3SHxhsxTIgXV4SFxsMdRt6E0EL/e+q3SBh/DpTXwJijAmd4Y4TSjon32sXGhjJlf /1HCPdhdocSscKpgPH99rN3Tt9AboUp9bPSAVav+PRYlG7S+aZlJVrZMF+IfsEX6GTzqs1wKuN5zT DTAgmvXg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1raijF-00000002pWs-09bQ; Thu, 15 Feb 2024 20:53:09 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH] rmap: Replace two calls to compound_order with folio_order Date: Thu, 15 Feb 2024 20:53:05 +0000 Message-ID: <20240215205307.674707-1-willy@infradead.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: 7E58140017 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 7uxggkankce7ckqjy557xskboqfa5gqo X-HE-Tag: 1708030391-792743 X-HE-Meta: U2FsdGVkX1/APLbaHFPZc+vykOFwPls05qYHg+yrTJ0PTxr/UQmuT7YAIW3TFaSTTnJZnCf6ZG/pi8zZaaLCvUC846XHKYQPOweCT0NDmJFpDQjDygABN+urvPv28h1PhAasvNgswDvodaN+iNW07wT0Ogx1Rlh8FAPVtJQchDP62hhhleJaQl8UqtOhgVcFNNWR4Cy8c1MO96J9JS4i7F6Ba4Sbq/P0LR7mxdKINzrhz355oHW7+o8wdHK3XypmNYQk/Av/s8tbMBq3Jy2TY0alcQ0kBSmHsz17W5YO0dFY482WPO7PKzPfPQP0i4uHAcT6EOdPkTO3KPGnuQZ/5o9WV90fsfelJvamYTo6SjjkMaQD8P4LtXLoA9j98qCgvtkQQOG1fQJOLqmTw+DX1YBMwbZauCDOsoXTTqJFFg+5hCBpw1jx8HrGe0A0TOVlnMpWJY4vFE3Wdh63ZBlueNVCQNKhbFMFDMKcMM3CP6Z8XeGpsFVYjiEiVqA8y8bmz62SGpKV9KOmCVltMd/uCX/oxKxiuLsWgXTuFS50IBqZwvtSRSWFA4lIOWNQDTsapgs8E51fEiFiZ16pZDknUd7ncJGW7wQI0CaFAWmWC2UQHS7SNrbvdeg3WiSxQmfWd9pWI4w+GIJ4QTVlxgFuaEW6mfyQGdHodplEnpb6X34GP1QzFpSSgqyaWCtaAVjUwid1sbr0E2elmMw8/+k4H3SalytCtB0mU2FFePzKbYQ2KIKCEQkBTp5eymOIY7oNrEl744tF3jpIHKK0I0n6JUSMk3RsQFVzjhN0HQ4bHcm/M4miK5BD95xc6IZYRhOgyV7jS1RgMJtg5IQ6mZF0AswXg4TcifZ8aO/HK8Dc4ZMFbXy2wzvDMjRWM5jKktiL8ejZqFAzS+wAOTRaTWX5UJcAWT8Y3jwM59u2CHQ9DsrYAEi6FNzcxDyXOU1uq8SUREmM7VK5cwJ1x+CYI/v zSUPPa0C 21VtI1Kqwa8r5kJSAU/BhKLWgQrma0jBWQLB1qJ7aLb7679Gza5JlthyvRoa7mMj6mhd7rQVRkd2UnmlkAko32gjSZNQkoPLvz/jTrLt9qF1uVfHTRfthefeJPoLZJeHMob6fN81BJPr4DME0I4OZRoOv5K+Gg+EgpYC7ylFeI61OIHw3mfEnl8iYZygSFIZO9/xFu3hic9fNtPKmAYgjEWMQ1LA2NzZR0n/u 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: Removes two unnecessary conversions from folio to page. Should be no difference in behaviour. Signed-off-by: Matthew Wilcox (Oracle) --- mm/rmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/rmap.c b/mm/rmap.c index 1cf2bffa48ed..3746a5531018 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -2169,7 +2169,7 @@ static bool try_to_migrate_one(struct folio *folio, struct vm_area_struct *vma, swp_pte = pte_swp_mkuffd_wp(swp_pte); set_pte_at(mm, pvmw.address, pvmw.pte, swp_pte); trace_set_migration_pte(pvmw.address, pte_val(swp_pte), - compound_order(&folio->page)); + folio_order(folio)); /* * No need to invalidate here it will synchronize on * against the special swap migration pte. @@ -2261,7 +2261,7 @@ static bool try_to_migrate_one(struct folio *folio, struct vm_area_struct *vma, else set_pte_at(mm, address, pvmw.pte, swp_pte); trace_set_migration_pte(address, pte_val(swp_pte), - compound_order(&folio->page)); + folio_order(folio)); /* * No need to invalidate here it will synchronize on * against the special swap migration pte.