From patchwork Thu Jan 12 12:39:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13097907 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 3C4B7C54EBC for ; Thu, 12 Jan 2023 12:39:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 67B3A8E0002; Thu, 12 Jan 2023 07:39:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 62B6D8E0001; Thu, 12 Jan 2023 07:39:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4F32A8E0002; Thu, 12 Jan 2023 07:39:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 409C58E0001 for ; Thu, 12 Jan 2023 07:39:53 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id D904C1603DA for ; Thu, 12 Jan 2023 12:39:52 +0000 (UTC) X-FDA: 80346103824.11.070B849 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by imf22.hostedemail.com (Postfix) with ESMTP id 42E18C0011 for ; Thu, 12 Jan 2023 12:39:50 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=SaWGlmCq; spf=pass (imf22.hostedemail.com: domain of lstoakes@gmail.com designates 209.85.128.43 as permitted sender) smtp.mailfrom=lstoakes@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673527191; a=rsa-sha256; cv=none; b=MI+I0gWDiI4ELcstSWQ0qzjip1MqxoNSSiBm9jKYypwC++8Is6SrR+uC0vkThMmk7dSfQ4 szWouMVwYjfnsKLfuSg/dzKTMNaPiiIZYh9Won36VW6t3VBOFY7pn9+wNXkmOGrKiACGQV DggVS7D7xAzxWene7yH2fIjl0e3EZ10= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=SaWGlmCq; spf=pass (imf22.hostedemail.com: domain of lstoakes@gmail.com designates 209.85.128.43 as permitted sender) smtp.mailfrom=lstoakes@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673527191; 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=1F5hZKUP2PlLbWKH0kODNe8bQmsfQoWefAi4zXNA/UY=; b=uyfZw8zIdiOO28PFrkcXECz8/WC0rqXnKP+rjv9UmZtir6baD2AQvV+fveaZihyJLw+Jxw 8xz5p9Xu5+cuv5idJNwhR3mn/H0VpiIYCm2kQi5AdlThKfiA2V0QrRd0fcMnZgraQddzFP CC2tMwtQLEAFZcUQ/uh3uxw4YFZvKMU= Received: by mail-wm1-f43.google.com with SMTP id j34-20020a05600c1c2200b003da1b054057so762290wms.5 for ; Thu, 12 Jan 2023 04:39:50 -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=1F5hZKUP2PlLbWKH0kODNe8bQmsfQoWefAi4zXNA/UY=; b=SaWGlmCqyO39Mkpqre4AEPrBUJX0bAhD8lTx0R6mWNFSzq4k91gA4SNmFFDs/+bGJe h1Ls8Ywo+pgSj6i35NxoRYedQ6SjFEUPjtc2kzFRAnhRVaeKuYQ7pB9LP922UfLyCF8J NCftknsoJQ9hsXgcyZNMphivDHo/mMRCIRgqv708Gm4C0c70xhsUaqdu7kqL9YBOAGGu e3jI3zVr/754Uw+z+/uLup9k1K5RacrCHjwUOuliZ+/xjzrEv7Tl+HGmXTAsei0sYbyD gzXHsJqZBk7+uIf0a/m/H5AiRC0LdthDtdiotb/DEyykTraPoG5ezfG9y/Mx6I/jFSR3 rV+Q== 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=1F5hZKUP2PlLbWKH0kODNe8bQmsfQoWefAi4zXNA/UY=; b=mS7R9WUR9BtqnzFR0HcRZw2y62nM1/F5c23wOKfIiN8X8UMuEGClwfc6Ru48FlXm8G uZ2DsaPfK+PLmo8RA0T+KCN6yBWWYT4lEr7g+wV5c6wui/qbi25W/Niz30Vi9TAq7wU6 5qcYx+9aRH3P0fGcci60Z+p3tt71/XWo2mHHvQi6K6KqyocFwJGPhOG2mqcABSbBQOlN G20sAVCmHnfWW04IJT0ql5NjzPetJGXdRvNxbzDQwr+lCvbrwAszpvuXuh+b8zYbXJWB 1sYvJdiWxg/2Fot1gIbSpOSmIs/lctUiat/VdVc60oPtB5OuOZdbwJKwF3OG95nwSavY s3NQ== X-Gm-Message-State: AFqh2kppjT1Uhofm/sPx5nREpZyDn3p2SPbRIUcStT8UOdPnVAzpjsrK zh+QVhven6Al3/crqj2PXAObDkYlixI= X-Google-Smtp-Source: AMrXdXuDbdrcAPYPvhGX5gk81jxxhlFBD8mA7wSio+fx+E/kAB/4BqAfHcPwgOWXYkr3uJcqF0hHiA== X-Received: by 2002:a05:600c:44c9:b0:3d1:f6b3:2ce3 with SMTP id f9-20020a05600c44c900b003d1f6b32ce3mr65756414wmo.35.1673527189537; Thu, 12 Jan 2023 04:39:49 -0800 (PST) Received: from lucifer.home (host86-164-169-89.range86-164.btcentralplus.com. [86.164.169.89]) by smtp.googlemail.com with ESMTPSA id q1-20020a1ce901000000b003b3307fb98fsm20890797wmc.24.2023.01.12.04.39.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 04:39:48 -0800 (PST) From: Lorenzo Stoakes To: linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org Cc: Matthew Wilcox , Hugh Dickins , Vlastimil Babka , Liam Howlett , William Kucharski , Christian Brauner , Jonathan Corbet , Mike Rapoport , Joel Fernandes , Geert Uytterhoeven , Lorenzo Stoakes Subject: [PATCH v4 0/5] update mlock to use folios Date: Thu, 12 Jan 2023 12:39:27 +0000 Message-Id: X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: 42E18C0011 X-Rspamd-Server: rspam01 X-Stat-Signature: 646ac85pihbx5cpmkw7k87fk81j9zk5r X-HE-Tag: 1673527190-399804 X-HE-Meta: U2FsdGVkX1/WCrrPGpI3wBhvq92jPMCsOLzJ1k/zOPy/gjkqQgvIDkWICg8MsTBN5rbg9dq0T9od2O3+klOx9oAwwtR0T+aWt2gFs0Mtqx3jB618q+3srFpwM/luFuqT+wVOQZ/NAuyPEaQ1Wb3uR/sqmbtcMhFVeaaZAsQzcEsABfc6FIaB2tyEDKl64f3jl0hCVjd37G916ng4/RfBleR9wAKvEXD52n48lJ7GRcW6HJER5hNJs8Xll0xiOKzlsfSjmKb4psSJTDw16VgrWfGRhwFY3nsO8YLyQ8xnaQHpRSMzYxebZZba4/GPiLucSOzFLH196asu95lncg61R+2SJ/ZXsJtsYNc4qk5gSCMgx7mlpK8ijbD6stpUOdDxOzbPT6dC+nAiWJ/nq1rdIvOl8lONCeCLoSaxUQs+nNh4J/PyjLKFsbWXWgNU7rnSqmeayMQ5yq68fMCQzirgvVWByWIkUZeONM2/0FJobsf7LoA87j/udHBW9if8S184M0fil6lzROlUh/d5wOuw9oOhTt40vClhx1+MWmCWJxZQTVXTEDJpz/v1ZldtyEXXMC4o0LTTi0E12E4C0qRWRDURhRUTVJP8NG3M8cux0P7y183deQTvYShOATqbMw8Vivz5p+aMicQ74SKgzgmk6nYBfRceawUNshuERoCpKHISvlU1HsTenICBjtIAVPeoZ987gY8LlyErKQ+rAo7IYbZMYFUich4RoOQ7lQigiXvPnWYUkKmxrXJ/BjcobS4fq0M/M1+a6V5+KZG7+VgdtbIfV3x4v0tMkrQhpk4yrd0n6EEOgDAVd1O0kwy0OE9O8jm3sR3uuw/zvqWr5VOY3xk3+rlHV2h49iGnRzIDkuKU6HhU/fV2nsbBs0qXaull9QMqNU8QOeRovEU1lm1UF1HGT0fbcnDLZVSJ/ExgwdLIHk2kONhdn3kkmAudGf7OA5JQKvFspF7084BM93S ZYAUuMMf /5suVG1N1rSLaC3bLbJ4zLKyMVPxMfDxoWy0UtZfyiJphl/HzKEvYXWXYrc+T7Fu94IqjmPL1A0QwApajUhPV9/l8n6IalGvu/fZKi9hXCnkciOELXEydPhLEeZeaZv8lEt2I 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: This series updates mlock to use folios, converting the internal interface to using folios exclusively and exposing the folio interface externally. As a product of this moves to using a folio batch rather than a pagevec for mlock folios, which brings it in line with the core folio batches contained in mm/swap.c. Lorenzo Stoakes (5): mm: pagevec: add folio_batch_reinit() mm: mlock: use folios and a folio batch internally m68k/mm/motorola: specify pmd_page() type mm: mlock: update the interface to use folios Documentation/mm: Update references to __m[un]lock_page() to *_folio() Documentation/mm/unevictable-lru.rst | 30 +-- arch/m68k/include/asm/motorola_pgtable.h | 2 +- include/linux/pagevec.h | 5 + mm/internal.h | 38 +-- mm/migrate.c | 2 +- mm/mlock.c | 280 +++++++++++------------ mm/page_alloc.c | 2 +- mm/rmap.c | 4 +- mm/swap.c | 10 +- 9 files changed, 192 insertions(+), 181 deletions(-) --- 2.39.0