From patchwork Wed Nov 9 01:23:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 13037031 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 0ABDFC433FE for ; Wed, 9 Nov 2022 01:24:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5ED956B0071; Tue, 8 Nov 2022 20:24:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5755A6B0072; Tue, 8 Nov 2022 20:24:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 353F26B0073; Tue, 8 Nov 2022 20:24:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 278CA6B0071 for ; Tue, 8 Nov 2022 20:24:53 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id E3C09C12B5 for ; Wed, 9 Nov 2022 01:24:52 +0000 (UTC) X-FDA: 80112159624.11.2FB4ADE Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by imf08.hostedemail.com (Postfix) with ESMTP id 50D00160005 for ; Wed, 9 Nov 2022 01:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667957086; x=1699493086; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=0TMMNcHvMTwfWl9Wm/AU82DRQX/a8ASBVMfhyIlRsiA=; b=fumN8kjDWUCVSWVg4TJ11U/eyGsHLZdE6SBEkAiKczxp0HGYnNu26IG0 qB9IqiBe3GrmUQWTQz2HNntomuoFEwnXB0LXcB10SyQMZEXBcGpzQ5h2M yjwrNz4FDWnyhj5arwY2XuiFRo5Nlnw2nZc1DFXPgIvJ5t/f//RIlZB8m 2hgNVq2n9fw6dnKlLlfy+8uB0eSHKruS7rQ9+J/w3fAyF5YGBri8AluDD IAJjFEHA+bRmCoybhZVxQj3oH5xUt0e7GGij8DjxuEnrtZlMAhLtBqLgj H8ENhdYlM4VSdjwJk2izIB6C01bmO6r5xkrsxHySAmVnhLJied/Hm3TTz w==; X-IronPort-AV: E=McAfee;i="6500,9779,10525"; a="337587341" X-IronPort-AV: E=Sophos;i="5.96,149,1665471600"; d="scan'208";a="337587341" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2022 17:23:58 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10525"; a="881731712" X-IronPort-AV: E=Sophos;i="5.96,149,1665471600"; d="scan'208";a="881731712" Received: from yhuang6-mobl2.sh.intel.com ([10.238.6.69]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2022 17:23:55 -0800 From: Huang Ying To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Huang Ying , Zi Yan , Yang Shi , Baolin Wang , Oscar Salvador , Matthew Wilcox Subject: [PATCH -V2 0/2] migrate: convert migrate_pages()/unmap_and_move() to use folios Date: Wed, 9 Nov 2022 09:23:46 +0800 Message-Id: <20221109012348.93849-1-ying.huang@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667957087; a=rsa-sha256; cv=none; b=B1LStWKpFHdjJVQmkgGZXw5+O7Gl8/5ysrZg3lVBjbvDjTGMGR1vsbOGgq+aCLhP5HYXLl dNaYP23rcs4kxlUxFVG5X4i5WU+UZczsG6QAVFi8n/FbIBswNfoPZE1N7GqgEcRjU9mUrj WKh3OhIWWNtFKbr2E9nMfPMEaNxchSs= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=fumN8kjD; spf=pass (imf08.hostedemail.com: domain of ying.huang@intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667957087; 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=rvExt0einn/UeCnuaeKBAkjf4ikvQdjKAOg8Kn16wH0=; b=I2IbPq5Dle4CQ0h6+aXBXyAZ/P7tTx/uhF++kGWXiNuDPPRcH+f/hK+fyyhrCel5zlRglP IiBkux5rljJ2oOhPVogfT5RTjCM6CtQ3Tg9Im/zrWgXWglS7Ricn8lwo4ADLOEmhdd5k1R G55+ysTF7Av1wXLKW/B1vBZEP0uSe6k= X-Stat-Signature: qdwny9nxexo88tyn9jw18ui95s5dkis3 X-Rspamd-Queue-Id: 50D00160005 Authentication-Results: imf08.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=fumN8kjD; spf=pass (imf08.hostedemail.com: domain of ying.huang@intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1667957086-76984 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: The conversion is quite straightforward, just replace the page API to the corresponding folio API. migrate_pages() and unmap_and_move() mostly work with folios (head pages) only. Changelog: v1 -> v2: - Rebased on mm-unstable. - Added reviewed-by. rfc -> v1: - Change API to test transhuge and hugetlb, per Matthew and Zi's comments. - Make THP related statistics for THP only, per Matthew's comments. Best Regards, Huang, Ying