From patchwork Mon Apr 4 19:30:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 12800656 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 0DCD1C433EF for ; Mon, 4 Apr 2022 19:30:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 15C566B0073; Mon, 4 Apr 2022 15:30:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 10BF56B0074; Mon, 4 Apr 2022 15:30:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3C256B0075; Mon, 4 Apr 2022 15:30:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id E74ED6B0073 for ; Mon, 4 Apr 2022 15:30:25 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id BB2CB61646 for ; Mon, 4 Apr 2022 19:30:15 +0000 (UTC) X-FDA: 79320187590.05.56B666C Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf17.hostedemail.com (Postfix) with ESMTP id 4E4B340030 for ; Mon, 4 Apr 2022 19:30:15 +0000 (UTC) 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=uLiois9DYtH9c86V0Mz3QSI+uZpAhT+ghVqaBzBryIk=; b=UCvro9tYdMS2XVjGFFRh8+TlC7 Tn6fEZsoecofUIpuk5FR8TIqJ2RyQ3r5lQRxaDx6VaET5VgkkJnFZEsEdHMNDztaZGPJCAtaS+Lg+ hyHM4zRyJNNhNjB2+KypB3I+BzgYE5BS3eU32TQiFxITpTA1I43ShBDSzdB9D2VVO9YLENpoglna6 8LtI/W8C6WhOXjVDvhSyobHHyfImDhNmDkH7PEgFKk+M+9A2/vwba+FnDHnUNZyfLoWMwR0S3Cwrs OZMi9qOTn4Dl5PGK8OND3cOGFI3AzXCX5Vvhm5hDT1nVmqyozgTj12dQGf7/h+eEBMXU9kcxFvox8 n5e0XSuQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbSOv-005zqG-37; Mon, 04 Apr 2022 19:30:09 +0000 From: "Matthew Wilcox (Oracle)" To: linux-mm@kvack.org, Andrew Morton , Zi Yan Cc: "Matthew Wilcox (Oracle)" Subject: [PATCH 0/4] Alternative fixes for migration Date: Mon, 4 Apr 2022 20:30:02 +0100 Message-Id: <20220404193006.1429250-1-willy@infradead.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Stat-Signature: fbqctgoobepm4ou5wofaby74qwid3ocd Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=UCvro9tY; spf=none (imf17.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 4E4B340030 X-HE-Tag: 1649100615-568481 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: I heartily endorse Zi Yan's minimal fixes. These patches, drawn from my development tree and with absolutely no testing, are a different approach to fixing the problem. I would have submitted these patches earlier if I'd known they were needed. I think migrate_misplaced_transhuge_page() may be missing from Zi's patch, but maybe filesystem pages can't end up in that path? Anyway, let me know if you like these patches better. Matthew Wilcox (Oracle) (4): mm/migrate: Use a folio in alloc_migration_target() mm/migrate: Use a folio in migrate_misplaced_transhuge_page() mm: Add vma_alloc_folio() mm/mempolicy: Use vma_alloc_folio() in new_page() include/linux/gfp.h | 8 +++-- mm/mempolicy.c | 38 +++++++++++++-------- mm/migrate.c | 80 +++++++++++++++------------------------------ 3 files changed, 56 insertions(+), 70 deletions(-) Reviewed-by: Zi Yan Reviewed-by: William Kucharski Reviewed-by: William Kucharski