From patchwork Fri Sep 15 17:28:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13387299 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 D470AEED61B for ; Fri, 15 Sep 2023 17:28:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F9266B034F; Fri, 15 Sep 2023 13:28:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A9FF6B035D; Fri, 15 Sep 2023 13:28:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 571306B035E; Fri, 15 Sep 2023 13:28:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 408F36B034F for ; Fri, 15 Sep 2023 13:28:37 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 07C1514022B for ; Fri, 15 Sep 2023 17:28:37 +0000 (UTC) X-FDA: 81239516274.12.A1C61A3 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf07.hostedemail.com (Postfix) with ESMTP id 6BA3940009 for ; Fri, 15 Sep 2023 17:28:35 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=V4WSU6j3; dmarc=none; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694798915; 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=qrq8p9yZWY/o7Jujh/Hgy9LgFQ+ehicAWEAzhOimblQ=; b=42HVjcA6w9OjQ9Lyy+J0IQ6ItwGkFlzkf/NXIWSH6fD3rNzzjQrcMUgl3alBE6Cp/4ELjf LBTswvvpXwfYj01IlFM1JmxpLBR5ZkZlD0wpWclNosdpERkUg1U8sYC/XjdWIDkPraiUQX S95RM4yt6vXJqyYO7Ll8QgeL23s4pEQ= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=V4WSU6j3; dmarc=none; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694798915; a=rsa-sha256; cv=none; b=ojgk3dAbzV3ySNds+2JvSthhJQTRIVwu0kvdC7cci0Dl1b6ES84eH6ry426iYThNTbMSrE Bx+mXdiEQNo2R3CeC3Vncl8cEJPmgAi64HnnIrNDvyAik0FaSOAh9+jfHEFt9vrCNXRlQQ mMaRhSy0rAiGBT365bnNEJzf/ZTQHng= 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=qrq8p9yZWY/o7Jujh/Hgy9LgFQ+ehicAWEAzhOimblQ=; b=V4WSU6j3lknAkAKGSi7BS51kBd IgDYexp3G9Sq2vB35PEykRe/Z/9hxh8qCDis88/OYvmu7uoMZn/ulox76Gs9v2ZWB2ixlnT8VLQb3 y26PNvyHjGMuwF97rHf3T+2P1Q+6dECmvQXVcyaqcy+mzLy03+ofmwaw8HQ1kGHw8QD0OjbkOJx9u QUn8qCSC7i2L6jkjmqSNtcm3cr1i/1MsR4CeKvU8LOKw61CZETdN4h6TsBnLBabChT0fI8mk5zDD3 nvM46wOeLE7gm99sQSfLNETpjZRyzFVtbroiPTgbbpecgUJB42e1IhhNbBiWzUyPgdmMmRaLCnlJd CtTrBobw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qhCcI-00B2xp-DA; Fri, 15 Sep 2023 17:28:30 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Claudio Imbrenda , linux-s390@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH 0/3] Use arch_make_folio_accessible() everywhere Date: Fri, 15 Sep 2023 18:28:25 +0100 Message-Id: <20230915172829.2632994-1-willy@infradead.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 6BA3940009 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: qkfyafwg8xzxzturo6amoemcp6xg859d X-HE-Tag: 1694798915-794093 X-HE-Meta: U2FsdGVkX19yBIr+hkgtOoevA4KRTReY+4TAgsgJz5dSelx0qWSFO3dQjlsr/2tdPwnubf6UxbXEcnj8Zqu2SHWBF9QKAYs9sg/yGy+SGn6RjPNL4Ol4+jvqJHsJ1SqdjNe6kd9Dqk0H69ZdB8l4R3wbgZyOdlatFhgNkiQMspLbsOkpx6+JY6oRu6Qzj04mDv0uMGjn3ocQfB+x8S/WQoH+FzwBtuIYjTT1rwWKLlRMHlE3xfqDwngAFaSLjtmRMOpFx5YZanvOdvjda+DvZmHZbawTDxg5cSuKXFgWiSO0wBdEJ93XIPbIllvxqdKRj8Zk64pW/FK90PqhYP/JKMavaQLELub0iETJp3qd2M0Fmm+3rU5NzxhhmKoqt+/EYWl1CavOw251ga6CbDOl7/px4YMhleFiqCpMPjwU656frxgzvz+VgboJID0OGLidGjW7FHVax63rLpbrOMxpiYFlNDPOzLR4uUozdrAt5QZhcbdEKfB3pi9RkUIK1pvxxND1s3fNiBqF8Dodb4n6GHMiZGzNsvb0HSGCjAE61jtudHVV6K/t7P47Q1XIxKgxQtIsN/PR8ETDul6xL2iaJLKHZNOZXzSSZPJEgXVpyT7hlDyEYYIkzQCc66penD9qn1Bw4Nh4HGGo4W9r0vDWuBcCK6ZIp3Y07QKGis4WU6nhL6uG+wI0ma+kuVwcsD98TT1CnHULEX8EzP9HLFgOsM2VgYdtbZ8dILLBA23y9nySPb1qbMBs++61eqv3jDEvQsrvcNIzWW6Z2PUH+VinwinPW3r0UXQi590tIqp3e69HAE8mxzWpzTqpv9NkB+ziBn+RS5Q0jmjQdYxORL65qGXjHcVFLExQ31ptmTs3pQT2fK9dX6QmopEFiu1XEWlIRtYBp43cwvL5FBeJdxlbSd7Uge12QCiExWpv++WcfiCgjhQPpKE0evI8FpDC3ygZGIcrijidmfa7t1/95Ty ag7uv374 csVRi0/60AukD5yPgaXOvkt1vXWYwqxBehAOwZ+Ww2Ra/NSstrp6ggAZcylxjdv2y+qA5vadh4BqlT9IXk87EsoZrEMMr/eWBZ4s0TF+O+KZuiaWuPd3Z12VdKDb8Ru+mTkcwanN1rAjXU8r3X2ewE+u7p4bAIruu18FF/0JEx+q3cfE= 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: We introduced arch_make_folio_accessible() a couple of years ago, and it's in use in the page writeback path. GUP still uses arch_make_page_accessible(), which means that we can succeed in making a single page of a folio accessible, then fail to make the rest of the folio accessible when it comes time to do writeback and it's too late to do anything about it. I'm not sure how much of a real problem this is. Switching everything around to arch_make_folio_accessible() also lets us switch the page flag to be per-folio instead of per-page, which is a good step towards dynamically allocated folios. Build-tested only. Matthew Wilcox (Oracle) (3): mm: Use arch_make_folio_accessible() in gup_pte_range() mm: Convert follow_page_pte() to use a folio s390: Convert arch_make_page_accessible() to arch_make_folio_accessible() arch/s390/include/asm/page.h | 5 ++-- arch/s390/kernel/uv.c | 46 +++++++++++++++++++++++------------- arch/s390/mm/fault.c | 15 ++++++------ include/linux/mm.h | 20 ++-------------- mm/gup.c | 22 +++++++++-------- 5 files changed, 54 insertions(+), 54 deletions(-)