From patchwork Thu Mar 28 22:58:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13609724 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 293A2CD11DD for ; Thu, 28 Mar 2024 22:58:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0B4D16B007B; Thu, 28 Mar 2024 18:58:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0648D6B0082; Thu, 28 Mar 2024 18:58:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E4A1E6B0085; Thu, 28 Mar 2024 18:58:38 -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 C6FC86B007B for ; Thu, 28 Mar 2024 18:58:38 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6A4F5A0F02 for ; Thu, 28 Mar 2024 22:58:38 +0000 (UTC) X-FDA: 81947963916.04.E5DFA06 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf25.hostedemail.com (Postfix) with ESMTP id 4C539A000A for ; Thu, 28 Mar 2024 22:58:36 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=WU77P1o6; dmarc=none; spf=none (imf25.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=1711666716; a=rsa-sha256; cv=none; b=UtuMOlz0Y4k0YVY1kiM/QLRjTd5xqGItWC9hodMJSeBCdM9eqs3J+hDxgaNxroCY06i4r/ wsSLsiMd0ZsPSidAhsY4VQYIF3DbiaY44W3uk/qNkYbqt0SPQ/oTxsqErMe9xeNLp2+qPY OFmPesyOUViacm5+H4Op3dNsTHs5ggg= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=WU77P1o6; dmarc=none; spf=none (imf25.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=1711666716; 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=o+4yw5KN17hxqkQG/Lx38t2xjwiW+H+rI1fwuixRIUw=; b=EEzUBMA2bo3GVqHryglYUp7IaWyrtPVDf8zQUuMAk3jsWW+z9TeK8uRhtUI4jXM55As+BK 5fBfYBQ0sv7gj3v7CCTY/UB3o8WzrApHUj2YO6wkz8QsOuES0ONNdTOcgip44RATeuCoCH ZYJJju+MgVQIRdkd2D9PPTjWEkGilCQ= 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=o+4yw5KN17hxqkQG/Lx38t2xjwiW+H+rI1fwuixRIUw=; b=WU77P1o6gd8OibynNPuOlElJVr KYkhEYn51Zn54BfD9AXSHRWALUTmt6IXY+kaGCkg8wOqk4jxbLVLy6DKStP765FXk/u3kbu56aRUP X59q+rwb8afnlVM9t4/6N5N9PwVJXKrVtJRpWoO1f9KpMSAwBnqKwbR5jW6gqdslLMt1LOqgJWmOr hxecA41/O3J/XdwuQuRFgn2pK3pum4nD4gPJ5wD505E1w32RtZAjxS0RKLpJsX1+Ne9o2GyGc+llG TKgAC5eblZt07PpPRV1psz5nYEYzExtevrHDMib7bMNLFPc9Pgq7fjwVuVcq5Gs+2c2t8lU86+DGQ O0JA7JJQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpyhd-00000007PFQ-2Spo; Thu, 28 Mar 2024 22:58:33 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 0/3] Unify vma_address and vma_pgoff_address Date: Thu, 28 Mar 2024 22:58:26 +0000 Message-ID: <20240328225831.1765286-1-willy@infradead.org> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 4C539A000A X-Stat-Signature: s85cun3pxkazydaq7ayb788a5h69crgh X-HE-Tag: 1711666716-882585 X-HE-Meta: U2FsdGVkX19vWwRr2jjDLWK8Ri9wEHr+NK3IJ1jTFzzkqvVC4i6HxgapT1IDR98eU4kYVHEPmd8o5dUJa/AI59ZO3TImLylD6oBqnE5BFcbI6cNh2DjdV56xYKIJ97pnwLaqi+Ib+/mnrTxuS/vq1nMHVX2YdPSQi2v/5RM0HIyD1cVSpVUJRiCIV/EdA1Pc8pHc9yhe4rcgHZdBpd3l9avHt4FhWsNWtA6iZgIXgpN++60qgBP/dOhOX9G2w2LBBmy6+fL45e29QVRDsCiTotauP+Cs0/Eary6RVM6sr3lpNXlW4SjgYbnhPfmPpmTB6rNzcG1QMN3e5miJY1+wNgGNlrYbUuCdR2noR63GbMrS0kVkdAlGb7+1JRWoCVZWkpEeKfV11DJuc/ZUZs59K4ygLhddfTkH9K4BJ24B90TWiOecS06S+pF/nbn2v7e0OZR6Tdeg6gMf6oW6M/Z6He2Akr3S0xEj59lzXFh/ISsL3fAB9Zag9BvdDdgep2/bYXtQMLRsHvNo+jMTArlzLXobW9lIJm06Ttrb5b+zz9eOpo7AZdIowHaWf0vSLQVU07AbqvyCam+TbYK7weKBry5CWV7DOurdhfM4LQeptFpt2C5tfqz53Ss4HyOFgLXn3bFam4D9jlt7xxGfnjVqhvVTeRSvD7TNt+gMKm65ToATNsZs9bFlYP6kQiKuKsinrjzLl6Jeg9AwrCw5u8AZd3pwLJnV3bsaqtGc/ilwbDbEp01te/YiRVCDZVwJ99cf7eoLvFZgw9ZpUmWpkeBug7kAuLN7pAqbHbTr+hdXWY8H/XsCtrFHP3Vk9Q1gAyX63IZRy3CJKpXB7DLGEeDCF0hk6zVzplpx2dGRkK6t6obnzIs05yT4f3K+onjmxGv8wN0/nAAmSHPUApI8C5Qojt8Bq7y5faGKfeAnUagWaIKdgBXIrNUs+cz63S06oD0Uw4jWz6uEwQi59GCvK1W H6xcLXZZ zJjx74LnCu/vazMwanVvzXbsi6C0wmcoA+JWHaTg8H1FasMXqCH3kkCTV+qSzxZhJ9hxlEBxOolrwhDx7NHSoqom7D9eUIJUK8lOVoE7O5IIU+I2rkL/Eo/8kYSUTd2Xfs19SzTjK236nkB1z3+9J6Dwu9BaJnjBrdfys 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: List-Subscribe: List-Unsubscribe: The current vma_address() pretends that the ambiguity between head & tail page is an advantage. If you pass a head page to vma_address(), it will operate on all pages in the folio, while if you pass a tail page, it will operate on a single page. That's not what any of the callers actually want, so first convert all callers to use vma_pgoff_address() and then rename vma_pgoff_address() to vma_address(). Matthew Wilcox (Oracle) (3): mm: Correct page_mapped_in_vma() for large folios mm: Remove vma_address() mm: Rename vma_pgoff_address back to vma_address mm/internal.h | 28 ++++++++++------------------ mm/memory-failure.c | 2 +- mm/page_vma_mapped.c | 4 +++- mm/rmap.c | 14 ++++++++++---- 4 files changed, 24 insertions(+), 24 deletions(-)