From patchwork Mon Apr 1 20:26:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Moola X-Patchwork-Id: 13612998 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 5C628CD1288 for ; Mon, 1 Apr 2024 20:27:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BC38D6B0083; Mon, 1 Apr 2024 16:26:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B73A26B0085; Mon, 1 Apr 2024 16:26:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3B106B0088; Mon, 1 Apr 2024 16:26:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 8647F6B0083 for ; Mon, 1 Apr 2024 16:26:59 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id B94E880167 for ; Mon, 1 Apr 2024 20:26:58 +0000 (UTC) X-FDA: 81962096916.03.71643F6 Received: from mail-yw1-f176.google.com (mail-yw1-f176.google.com [209.85.128.176]) by imf23.hostedemail.com (Postfix) with ESMTP id 13DF314000C for ; Mon, 1 Apr 2024 20:26:56 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=OqczK2kE; spf=pass (imf23.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.128.176 as permitted sender) smtp.mailfrom=vishal.moola@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=1712003217; 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=/3w1qxaNxZIdwI9NavJWkwaLl0QOhoYQrMhbubFtt9g=; b=bSz1+fdZ3ScZYkT/BpK8jx8GY80GOEfb+OCgvgyQC4J0lmTC7BOtpOT9YgKT935PL47FOz zK0Cb1IErRCgfzYeK8/GfrTazCgTCHH51VPHmx/b/NRSb2cfJ+yoRqjV+S2cAAhJtgem2z 8+YwXFIhs0Ox55z/i1J9L1pOD0/r4Q0= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=OqczK2kE; spf=pass (imf23.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.128.176 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712003217; a=rsa-sha256; cv=none; b=QH/F4UU1f/WLEvdkhOrvt74Zm+bSyACbMu9OjBhdzA+pKTuZi3FZzF+ov6g2GP753aGAwm ht8Osnf9rlGmvgQ1DYyTynNsKeWaM4cfCTuzHhCZm8Av+11/PWVDKGXl0QIGCbmAKaT86A 8GR8Olhd+VG2BAzvBl0zli686Bsrqbg= Received: by mail-yw1-f176.google.com with SMTP id 00721157ae682-61453963883so33310857b3.1 for ; Mon, 01 Apr 2024 13:26:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712003216; x=1712608016; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/3w1qxaNxZIdwI9NavJWkwaLl0QOhoYQrMhbubFtt9g=; b=OqczK2kEbKBEGP4WqTNq8T0Efzz0NeP83qZ1/0MM3zY16b6pGz46mWmy1zrFC9WPK+ ZS2MdZXSGMUrbdHnJU+FI989EKGsiCyGFTBnMYw85nOoBg3ii0G/u5m13cYzppia85bo M4cYivabyJJyevaNr68fWHgJhGjalW1vj/sPdAPkFlhpELqUlkx9y+CVunqBUYtxNyTw UWlJ36mO1GOtGMBQqdavcyB5iK2w2bCoRrX7acoDrlkJlAGyQrq32wIHsddOpEWLoTjI PMfDLwD1lAch2c95Ch79W0OH5Ce0zppqN9s8wpN9Fxn4drkXjS0xrk26ijn6A25Lyguy 14jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712003216; x=1712608016; 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=/3w1qxaNxZIdwI9NavJWkwaLl0QOhoYQrMhbubFtt9g=; b=s6GgU8XVL/7idAgy9aBwQeEVH4jISr/rRAzcuoqFlUfVckyfDaZ087bNlOpPgJB8cj A4UCtGFeqn9iRhDmDOpavlkv00TxBT54bU9JxGzb1KLOHu+Q0Tbt7XIeI3g6mPLKXkbc VBpsYleerM50WkS2MXywLyo96cbMKVbVkVAYR2Rl7pU2ciAv0l9oRPMMaUKG2a+xba9k ZPIIGdDzUkz7q1mJS3J+cnJaaPOs6HqXS1tYa+HUXr9Icx7KGqGzt0hTMrib5cmrT+pq 24fUJQ0WdbHOE9ycmyZXn8rajHqJZwYvx1eNo45cXstdfksA9co4yNMLqPq/Y3EMwuZt 30xg== X-Gm-Message-State: AOJu0YxG8jD4X+FTBGBAt5GddLr2pQMbNxqzrJlI8WaDW3aukwQXMjXL CUU9bl4GSvFV0Sk2brzWwowejvDoRDwqrHUPYGeIC1nWjSFT99FgRkQxNqsm X-Google-Smtp-Source: AGHT+IEmb7k4YRsZQUzxuwntHaXrMyAJKhIBr6lf4K92Ji8HKVVSDGbbfF+JCZ/IxfgkYTVrqTqSdw== X-Received: by 2002:a81:4987:0:b0:615:16a1:4a04 with SMTP id w129-20020a814987000000b0061516a14a04mr789351ywa.31.1712003215911; Mon, 01 Apr 2024 13:26:55 -0700 (PDT) Received: from fedora.attlocal.net ([2600:1700:2f7d:1800::23]) by smtp.googlemail.com with ESMTPSA id y72-20020a81a14b000000b006142210a31esm1171181ywg.23.2024.04.01.13.26.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 13:26:55 -0700 (PDT) From: "Vishal Moola (Oracle)" To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, muchun.song@linux.dev, willy@infradead.org, "Vishal Moola (Oracle)" Subject: [PATCH v2 0/3] Hugetlb fault path to use struct vm_fault Date: Mon, 1 Apr 2024 13:26:48 -0700 Message-ID: <20240401202651.31440-1-vishal.moola@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: 13DF314000C X-Rspam-User: X-Stat-Signature: 8p7ti5m8jqkk96y6d6ywp5grkrsaggdj X-Rspamd-Server: rspam01 X-HE-Tag: 1712003216-372539 X-HE-Meta: U2FsdGVkX191/dWUH/SyPeNijj1MxMHw5NDYa2v9Seh1Aus4kXvzaWKlekv1UwXRFtQY3wnDPdwlFHlXkZpxdbTKlkRAHtF+prJAX28pgyNEHzou8PA9TeH9MdjqOBdAqx/MQF7mK0/ByJW+fOaCdk6qYMp8TRy7WPS35FAUwv0OfPOCuE955AtEWppG94N1bYfUrYteJUF2QnY6UGZBS4EtHZr52V2U6GCAccKhiJkSq0796FMM/LPxW+Y+IJJv5V3vEKR5oqZryUoWca5ftcWg2E6yFAamfnXMAIu9+/g5uang6XieChAA3bcVO89H2nfrwm1DObbnP3hwY+EFPunRBSwROEZHLs6Es/xMWg0Ngn/5HAE9fcAgOS6hTNOhsBZHdZEtLW6AqZlwd2bHs30W0HouKBlKaobf4vAzJG0JI2AU6m73+AoaNQVJQI+UFiyIPHvpy5NmuuZi/lguurC6CivdTGpnDZViIpyXoGR07pu2290aRuH4O1sa2W2Xho55PgISJDqI1yaJNwzbjzOnZoLbDzz7DEEOIYQQ+kwZvCEdezMrHvGUw3sXc8xQVHIVsx2R5vy6jKB8FDGV6/uEbkJMRr81ZC93nLfVpoOYrwXEUOjlFjh786n4+8jolsYJXpwjFwEIrQnj0PdwyPGShlU3b1JXRLEXbVTrKM/HY0hCb+l/SFbY6DsrinwFq7TDfoD6SZsWP6wQ0eStTtpsoK/JAzmEuRZi7GmSRi93Ne0fpBi3AyfA8SSDjGgq6+Oa+rAH6rHrD/NH11kE59MYXVCyLtYYSXQQlnQxwF8maNRJgcEQ8A3uuygj9tl9B2gnd0WyTbvm5FBUf/RU9VIZyoHGNrhyDx0yzVXHWHvJFI4M51ZjKF5hogviFdT3YuElAoqIOVjeJF5qc6GfwxpgkzrpZRDao+QqFHCB+0HU93M8l/edm23puut1EB0SnOCYYHpV2dO321IuwZR 9uyqc7t9 5xp9o2w0ESTCAvL5mAJdT+UAVfI+pekuYTs9opcVugYvMfkf4Mr8I2QlaHj8mYy6vTfQ0ebpoWcNRtuuO7OxqyKW1RJGGWavnqeCtaQs8Ie4K30p3Vcp13wgiot70tcO5Qbf6uEtqh3g684ySt3G2Az6fVwRLaHpZzKyMO52gsRCZYIgooh39XDL6NPHVB7oGalMKuTu1w5vgLqbT5yLgnBtmk2lX4IbNUEt4zJz+qSWZP/rkseMxEWgGzpaf/wr8c9ZRwkuOqBN0Seg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This patchset converts the hugetlb fault path to use struct vm_fault. This helps make the code more readable, and alleviates the stack by allowing us to consolidate many fault-related variables into an individual pointer. ---- v2: - renamed patchset from 'Define struct vm_fault in handle_mm_fault()' - Dropped patches 4/5 - These allowed vmf->{address,pgoff} to be modified, but that allows misuse of these fields. Converting hugetlb to using the same address/pgoff as generic mm is not simple, so that can be done later. Vishal Moola (Oracle) (3): hugetlb: Convert hugetlb_fault() to use struct vm_fault hugetlb: Convert hugetlb_no_page() to use struct vm_fault hugetlb: Convert hugetlb_wp() to use struct vm_fault mm/hugetlb.c | 194 +++++++++++++++++++++++++-------------------------- 1 file changed, 95 insertions(+), 99 deletions(-)