Message ID | 20240704043132.28501-4-osalvador@suse.de (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 AE8CBC3065C for <linux-mm@archiver.kernel.org>; Thu, 4 Jul 2024 04:32:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 26C126B0093; Thu, 4 Jul 2024 00:31:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 17BE96B0095; Thu, 4 Jul 2024 00:31:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F1EE06B0096; Thu, 4 Jul 2024 00:31:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id CD4F46B0093 for <linux-mm@kvack.org>; Thu, 4 Jul 2024 00:31:56 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 73E9880A47 for <linux-mm@kvack.org>; Thu, 4 Jul 2024 04:31:56 +0000 (UTC) X-FDA: 82300797432.14.0306A0A Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf23.hostedemail.com (Postfix) with ESMTP id 701AE140005 for <linux-mm@kvack.org>; Thu, 4 Jul 2024 04:31:54 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720067490; 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:in-reply-to:references:references; bh=P6aZ8d2FMHtbdVf956Be96e8ZvIEt8d4YS/FK2WFXU4=; b=jpDKj+PYGOSJ3V820V/j3dCpRIvHoJaBjLqiIZsYVsbbkwUnn1CyxX7r407l1CA+NRpDsJ DU1o0i+2K8iig6yyiB9/9+7dWmVSJkDjYIK3mhBqV5Tifa8wYknKPkF8ambt6U8rD9KKj8 OGbCA+fEM3OHWt+8clBZTejDOxUeR7U= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720067490; a=rsa-sha256; cv=none; b=tpImOdrpdr5UY0gTP8puDn0jDTWyiq4PX9bENYDw5/p86HlYb6RhEOJ6zyMr81jx14EoCG 52Jlt0QR+UufNODfN4ZG/AzeQDV10XOz+24NtgM1sXpBHH1HFYrhzYvxyeLa3njYhYx53a 4nbf1Onz2bJ1qhDhrirvWWAyI7Tauog= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 359EE21180; Thu, 4 Jul 2024 04:31:53 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 044A513889; Thu, 4 Jul 2024 04:31:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 4D3mN7clhmbnDAAAD6G6ig (envelope-from <osalvador@suse.de>); Thu, 04 Jul 2024 04:31:51 +0000 From: Oscar Salvador <osalvador@suse.de> To: Andrew Morton <akpm@linux-foundation.org> Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Peter Xu <peterx@redhat.com>, Muchun Song <muchun.song@linux.dev>, David Hildenbrand <david@redhat.com>, SeongJae Park <sj@kernel.org>, Miaohe Lin <linmiaohe@huawei.com>, Michal Hocko <mhocko@suse.com>, Matthew Wilcox <willy@infradead.org>, Christophe Leroy <christophe.leroy@csgroup.eu>, Oscar Salvador <osalvador@suse.de> Subject: [PATCH 03/45] mm/pagewalk: Move vma_pgtable_walk_begin and vma_pgtable_walk_end upfront Date: Thu, 4 Jul 2024 06:30:50 +0200 Message-ID: <20240704043132.28501-4-osalvador@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240704043132.28501-1-osalvador@suse.de> References: <20240704043132.28501-1-osalvador@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 701AE140005 X-Stat-Signature: j78pj19c94fm5topmxcpmdte4tdzr887 X-HE-Tag: 1720067514-745561 X-HE-Meta: U2FsdGVkX1+PRHP0dLh9JszCZ9hjlJaksBdLh2HUMZObMo4X6bPbenz3hZPQrCA0jdV2hOxbvxE9JSSlKWs763tWm981vW21fDYcFgrfu8DCocKkaWSLGjxoeb9B5lG46kal3lkuD4BFC1Nl/T3sQvzFcGksX3cDp2kP8PNW3ANsPaAt97U4K3DXCCLm122VcYBRWICTzYc4f4Y46n8DLeS+boG/+Z8W1lhd03K/U8uTjpGOFIyV54qQb7bCYb8umJ4rGJ2YTTdPR8FD9D8Q4C5zo2WnqsNnSrVIqTiCNTcKSw1OipD8X9p/sb5M+k4LPxn8tLv2NfwzMwu5czayGhtSt8ZdaDydg3DCT7bCj+0VXNh2EooiOgqGm6GrH/8F2ZvzsbZ5xKhSO3S1qAJw+7Isb4yg2ejegKgv7+fW8fZTXFIvx4nTfW5HeMAnZvadBBRXx+FsRQT4hPVkGl34yxFvOYlJZrhI25Pt1gzZRyr4k5wBG9U90EF2hJ4tM92sfTrwcj3saDx+I8GtkMnhwmFAE07M3/yj9KB1N3chWxY+Mdyr3rI5vMK2klEF4gxSBiXYsNuKYCraA8taF6ZAgFtw4+I/Ar+VIlva9JVWFfYisS3BegjBkrKDvIYSux45HohVZI2Oa0Q7c1plp0Wx9AynMaxFfAPqiHD3kxLsR6aC6JRpjVtQlzNK2oGklCEf5O7mrJ2vRQtRnL5z/2ZrsWqUNMzH8GBU9vtF8ZvEaxbL+sYyzX9cQSBf5udbD5xPjJp4+UUsueYAi2baaeakjDlTk9cD3ZejWxFCLJF2ZOKUkQ2UVMaNxJjiRHmy3kwrx/ABVwtp4U3fwgdS61ktNZ3jpoaqO8ClBuf500TOa9ahSJnftHG9YP6vugAQdA4sEVh7AkAacdPMW4rDISwfyEd2tEizsZETJqMB8GFhSKHj8KadPB2IjdycRlOBMSg/6RnKcvBFJ1GuQyqVdOu 6adzMRF7 0QD3AKVO3pXvlK3qYi4SYCuJujXasBVtwkmtCKqAbcKLisQxl/1du+thy/oXR08XmUm2fptVn/uvBTxRbSmTa6eqcR/+e2OfU4xZTGz7PARMPv6P3ep+SwHJZFUSBjW+W4aNbSf1C5UyR8OQvNriFCju1sCwnwc2Av9Zh8ni2vpm9ZEk= 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
hugetlb pagewalk unification
|
expand
|
diff --git a/mm/pagewalk.c b/mm/pagewalk.c index ae2f08ce991b..eba705def9a0 100644 --- a/mm/pagewalk.c +++ b/mm/pagewalk.c @@ -269,7 +269,6 @@ static int walk_hugetlb_range(unsigned long addr, unsigned long end, const struct mm_walk_ops *ops = walk->ops; int err = 0; - hugetlb_vma_lock_read(vma); do { next = hugetlb_entry_end(h, addr, end); pte = hugetlb_walk(vma, addr & hmask, sz); @@ -280,7 +279,6 @@ static int walk_hugetlb_range(unsigned long addr, unsigned long end, if (err) break; } while (addr = next, addr != end); - hugetlb_vma_unlock_read(vma); return err; } @@ -339,11 +337,13 @@ static int __walk_page_range(unsigned long start, unsigned long end, return err; } + vma_pgtable_walk_begin(vma); if (is_vm_hugetlb_page(vma)) { if (ops->hugetlb_entry) err = walk_hugetlb_range(start, end, walk); } else err = walk_pgd_range(start, end, walk); + vma_pgtable_walk_end(vma); if (ops->post_vma) ops->post_vma(walk);
In order to prepare walk_pgd_range for handling hugetlb pages, move the hugetlb vma locking into __walk_page_range. Signed-off-by: Oscar Salvador <osalvador@suse.de> --- mm/pagewalk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)