From patchwork Fri Nov 4 08:30:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 13031519 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 0D328C4332F for ; Fri, 4 Nov 2022 08:31:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 57D4F6B0071; Fri, 4 Nov 2022 04:31:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 52CDB6B0073; Fri, 4 Nov 2022 04:31:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 41C836B0074; Fri, 4 Nov 2022 04:31:09 -0400 (EDT) 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 33E756B0071 for ; Fri, 4 Nov 2022 04:31:09 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 0DCFA40999 for ; Fri, 4 Nov 2022 08:31:09 +0000 (UTC) X-FDA: 80095089858.21.A7C99BA Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by imf04.hostedemail.com (Postfix) with ESMTP id 3021540008 for ; Fri, 4 Nov 2022 08:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667550668; x=1699086668; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cAnFaZqCWM4hqUzOOmTBs/DxrnLkKG5XMrG3q6FMLnU=; b=itI0XwCAOZRoZANd+7Zdseh7eNeNXRKJysfuiHnAm7WdadNyEWsBFHPZ 1TqWwroYCIB1Oe/0usfDpCd/VG9FlmQRTGhzlg/vz9qb9STHD/GxueOv6 PQvrHrthQZktTK/8Ka5UtskW7/M1gdTYjeGgNAW97krtPGWU6AfzHSkPc Xqf+D51OZo7syCJdkwW4FB6A2NQE2IV5e5SDJ7uxGVogU9V9rRQQDBcFn fJSntbqb4xhyfLSPRNNLNTagY+60O7u1rDF0GeET7x477Vaju01+sTKdm 79P77NBPQU2Wm7EmdlBixh5FpcCTJL/aFlyE25kkSYJyehdHztdyj5cid A==; X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="311652300" X-IronPort-AV: E=Sophos;i="5.96,136,1665471600"; d="scan'208";a="311652300" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2022 01:31:05 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="629651906" X-IronPort-AV: E=Sophos;i="5.96,136,1665471600"; d="scan'208";a="629651906" Received: from unknown (HELO yhuang6-mobl2.ccr.corp.intel.com) ([10.254.213.176]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2022 01:31:03 -0700 From: Huang Ying To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Andrew Morton , Huang Ying , Zi Yan , Yang Shi , Baolin Wang , Oscar Salvador , Matthew Wilcox Subject: [PATCH 0/2] migrate: convert migrate_pages()/unmap_and_move() to use folios Date: Fri, 4 Nov 2022 16:30:18 +0800 Message-Id: <20221104083020.155835-1-ying.huang@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667550668; 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=n/pAbK5/SNC0HKHgCOwbKTf84+8AGLhMG0jFQDnq/uU=; b=GJWYJQgAO6+reUnNrIFK3DVwOhAC2/pPJImarhIs8UwDSao+rO02mU6QrsyNBEpiapnYI/ 1ZFtOSVqS6WWzd20G0Wohzc22xCAbb3DusY3pJGEU+F11ZihXZ16xvn62QEyUxp/zVHhF5 jzJoYig/6S7TM8+IpHxEDskyQ+aC9Rg= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=itI0XwCA; spf=pass (imf04.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.65 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667550668; a=rsa-sha256; cv=none; b=lbvumULcWOhwz4jFFWU3YxIXo5xwEHsonoExBSIgIpUHoLhJyIOqLXVuay0TR4hchF5VmO BAK+ajBjN9zXLQMfv1HFYueTDHSO3+W+0EJl9dFV3v3XUyFXfvx6S1Kgfyx3DVKtNgnb+8 TAhsiUJINoRVtoYIofovAILp9kfeSi4= Authentication-Results: imf04.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=itI0XwCA; spf=pass (imf04.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.65 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Stat-Signature: 5j77tc14ydxbwq6kbgujahfg7y61es9g X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 3021540008 X-HE-Tag: 1667550667-538472 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, 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: 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