From patchwork Mon Jan 30 21:43:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Moola X-Patchwork-Id: 4735 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2411045wrn; Mon, 30 Jan 2023 13:45:47 -0800 (PST) X-Google-Smtp-Source: AK7set9Jfod9SwJ770iimuJ7mVTl8luBJ1Ir/Wc/sXtROoG4J1VlVTMLqm2IH3tWDGgL0y+OEnHq X-Received: by 2002:a17:907:b9d3:b0:878:5f7a:7aab with SMTP id xa19-20020a170907b9d300b008785f7a7aabmr18864095ejc.39.1675115147395; Mon, 30 Jan 2023 13:45:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675115147; cv=none; d=google.com; s=arc-20160816; b=ILdlwoe5ySaXnVv8orE4wAIwphwvJt+QTJ0ZEa9MMnKEx2woS324lF9Jf76aFubzVm CuT6/+vUw3XlIB27hrF4NTgFNgRzOzjHF4WuVK0KQTOxfWKi0lVVqumkAN+ADdMftsAR yyHShf0JOGeWobJth7fLF422FCoG521U8GL1EeAcfVVyBvpbEJoRP69zKmnEDCu5KvgX 3ZIwJPFqRbbgBHPirwJgIPWFBfoYaWgR1g0Nm6QuHr4/s7Y+nfW6BcarvuA8khFnPeCm 1lkM3oxNYsEjYh07wvq833cK7tHH/Si9zUeUdlikm2TWTky5zrrmuD9hFEM1yoZN9l2B qSYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Be0GbNSETxdWEgUWa43nheEU4+7u32RSWDZM1/WkMvo=; b=QGFQeFbJ7X3dcpiykO0PjvIBmj8GZjl26k4Psp6FMY4584vanhC1n5OXvkLCVjHo3D I13ysiUnLxI84dtNtwuG6iex8dybLXcVwtZeMu4qQIZCgwtwXLDOBvO7OKIZWsXvAMKb 5T1D5eitkOQ5auT7hDa8mlXFoF/PJv64VkR1pv7R9zpQXnk/vWgm5Z2RrAZSbPha/wPA L85EU+LeVTpTwgDYQVwRlRBeLxNo+VhFPWBxQ/97U9yGFwVYpBIxm6o9lyaXS4bFjBOv YjppxBZyzAugaAIDzuKt0HvYi2yR8Qs92eWhDkxYa9YJEIP24E0B16OrJzyeoX3TGFpK gA6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kA1XRdzq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id uo20-20020a170907cc1400b008845c66840fsi7072096ejc.186.2023.01.30.13.45.23; Mon, 30 Jan 2023 13:45:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kA1XRdzq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229769AbjA3VoB (ORCPT + 99 others); Mon, 30 Jan 2023 16:44:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230364AbjA3Vn6 (ORCPT ); Mon, 30 Jan 2023 16:43:58 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BEEDFF28 for ; Mon, 30 Jan 2023 13:43:56 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id 5so13099910plo.3 for ; Mon, 30 Jan 2023 13:43:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Be0GbNSETxdWEgUWa43nheEU4+7u32RSWDZM1/WkMvo=; b=kA1XRdzq2oK/p0tfLkb68/ufyYI4rmOuaA1vGgSbyEtbSfRxMtUBaHPiweOmIuDR5n PPOr4B5wi34D1If6pjrmr6MZ7CndRDlNTgPrQXZ3P60OEX0l2nWkOnivXtg7EydEekOa 7uWlYxE5ZP9sc7O8c/8INej7egnKPfBuVV2d6mZsIkIEGhBSpNe71xaiqm6ZHPxwW0Yn YNlwi1fNbKzlJE9IT/qHPZD2eC3/uG9mWrzsyAEBD37ZOq1sqNDjbPoQMzRZ90TsUlDQ ZCqehH9QwRNZN2sUu38VVeD+DG8+m9Qxm6bqfMr6EHh4VHh/lwjpnJIMyLuZ3c+IQ11i IkCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Be0GbNSETxdWEgUWa43nheEU4+7u32RSWDZM1/WkMvo=; b=D0SwJHzmR8SpEUg1I3ibuoZvIoJCq92ZUzlrBCleyWng+ovkIBVnJuy+JmBm2tXzs9 Ml+7qx95Wsre4dAWKoOF9hoBAQe4jUBn7spgZ2mUQNgm72dqLuAnp6MA4+JL/eARd5Nh 6GlbvyjqbjYFQHyZgGIFc3VcKlwfwfCdPh1i8D+FaZ0K4H6N4qN2p+ZT7+EXPGq4lbko U0/OPkmJdyQSEl6DDTWdWqfefGP4WGN3CGeFVZdQnQd/KLj17fTB/Tn5YsJbaueGeBks //nG+ptI9YgjG6IKoyTAXVmterXUUvXSehm5G6wERxTObA8Q+t38My9HWECz9u4gYAqC NYHw== X-Gm-Message-State: AO0yUKWetfFn3QSFgGHKv5Dm/vmufcyQ0pkDgt6moDrXxES/sTJdLTzo XoU3Ctn2uf8ol63WkhKmeQ6Rc2JKsEM= X-Received: by 2002:a17:90b:3905:b0:22c:94f6:cf39 with SMTP id ob5-20020a17090b390500b0022c94f6cf39mr6594013pjb.38.1675115035362; Mon, 30 Jan 2023 13:43:55 -0800 (PST) Received: from fedora.hsd1.ca.comcast.net ([2601:644:937f:7f20::a8cd]) by smtp.googlemail.com with ESMTPSA id d5-20020a17090a628500b0022bbad75af6sm25156403pjj.1.2023.01.30.13.43.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 13:43:54 -0800 (PST) From: "Vishal Moola (Oracle)" To: linux-mm@kvack.org Cc: akpm@linux-foundation.org, willy@infradead.org, linux-kernel@vger.kernel.org, "Vishal Moola (Oracle)" Subject: [PATCH mm-unstable v2 0/4] Convert a couple migrate functions to use folios Date: Mon, 30 Jan 2023 13:43:48 -0800 Message-Id: <20230130214352.40538-1-vishal.moola@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756485541158678643?= X-GMAIL-MSGID: =?utf-8?q?1756485541158678643?= This patch set introduces folio_movable_ops() and converts 3 functions in mm/migrate.c to use folios. It also introduces folio_get_nontail_page() for folio conversions which may want to distinguish between head and tail pages. --- v2: - Add folio_get_nontail_page() to fix behavior in isolate_movable_page() - Rebase on latest mm-unstable Vishal Moola (Oracle) (4): mm: Add folio_get_nontail_page() mm/migrate: Add folio_movable_ops() mm/migrate: Convert isolate_movable_page() to use folios mm/migrate: Convert putback_movable_pages() to use folios include/linux/migrate.h | 9 +++++ include/linux/mm.h | 7 ++++ mm/migrate.c | 87 +++++++++++++++++++++-------------------- 3 files changed, 60 insertions(+), 43 deletions(-)