From patchwork Wed Jan 29 11:57:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13953687 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 88D88C0218D for ; Wed, 29 Jan 2025 11:58:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0BC9028005F; Wed, 29 Jan 2025 06:58:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 045C228005A; Wed, 29 Jan 2025 06:58:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E279428005F; Wed, 29 Jan 2025 06:58:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C2C5628005A for ; Wed, 29 Jan 2025 06:58:12 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 82FBE1C779D for ; Wed, 29 Jan 2025 11:58:12 +0000 (UTC) X-FDA: 83060341224.22.01072DC Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf27.hostedemail.com (Postfix) with ESMTP id 34F3840012 for ; Wed, 29 Jan 2025 11:58:10 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QNYiKJgD; spf=pass (imf27.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738151890; 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-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=d2VUZOG2JXQGulr/59KbaCbJaaQXiPGDaZBI3uCTMkc=; b=kvAELciXOC8HsS5bBXiLBD5U5Vvjq4JCTm3dDNAeVxju9pknMd5kSpcSYkinTCkzf94J6y vmwCRfajMVsy/nwOSBf1zzVSxwCl6fY85v3l2t9OFySWkbl4uyyhYRemC3k0zWSPN3pFmF 3BW3M/1LZMDB/YK3DxzHngMh0hqEIhw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738151890; a=rsa-sha256; cv=none; b=wGM1+EoEXAZTrfeWTQnBXzaOWD8RCSRIIc//AsN5w7CSnlL1mhAJBAzEhg2WB/T3iqT/hW ORAmFDg90S05bk5roV9wpXQkRHFWHPJou24kTdklV+BvK0w10s0k1SRS7o9NrDKXmEVmUW RU6UY86jVorhMxfn0OP4zVUSwWAX9Jg= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QNYiKJgD; spf=pass (imf27.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738151889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d2VUZOG2JXQGulr/59KbaCbJaaQXiPGDaZBI3uCTMkc=; b=QNYiKJgDxMguARoJP0WC/gONaaVqaCwqphsvNlp1fvSp08b1lSHZj5CrSJZsC7CkMq/giz KPKIQsUItLuD8TEHA55s0QB9D482HisqFrgpGFfLA48odTxaIqy3olc5SFwZO/NFcz1XIW uQ4bVpQuGLlhTdH6Qtu6LBzBxND+isw= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-61-_5HxdnquOcaS5XcJmjioUQ-1; Wed, 29 Jan 2025 06:58:08 -0500 X-MC-Unique: _5HxdnquOcaS5XcJmjioUQ-1 X-Mimecast-MFC-AGG-ID: _5HxdnquOcaS5XcJmjioUQ Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-38629a685fdso2379605f8f.2 for ; Wed, 29 Jan 2025 03:58:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738151887; x=1738756687; 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=d2VUZOG2JXQGulr/59KbaCbJaaQXiPGDaZBI3uCTMkc=; b=sqR3Wd+virN9xmgjtU6bgjPmF0F3jpoRmYtnH8WtLOdjkLf1Mh1+NZ/uroEQkLOCm5 d8WbTlO93b6sydadLbiymAxoKSUrKa+HA2791rc2c5FMrOqyL25RUA0XNpm5cSyXlrx1 H2jihZufLJXG+yJIy7XwffFxwWkCfno3c0WlJEvRLEiYYGKBHFH7n27VDw+hKARgFu8Q W5VeAY/PAW9ATCDc9o90VNfwQgpZcOYk8UEv8dTL7isOLlp5o0/uY0ycmuWHrXMqgKPQ HPlQRFw83GU+DNRkqinoo9bWDhEpOtYdq1ADzBL0f9HtpFLofUAJaU34+KDaIqaP0hU1 FgKQ== X-Forwarded-Encrypted: i=1; AJvYcCVBDIMVsFNHj11q6tsTkmnZUrrY3B+eSFzwGrbkHLMYtiT7qNtbWaPDRYDtYKDjOGGXCO3E7wAdUw==@kvack.org X-Gm-Message-State: AOJu0YyT8QmS/I68QWl5wZa7bqLw1O3U3J5AcUEE0tScke5cTuOjvzIi Y3FmfeR9mB3y9whwMHLcWjFJni2oeLEqKxIYRcAumueSlTzQgHEzZXTpZRWJZvG4mz1H0ALQYgN XD7AFpfeCAis8o/vLBPDPf+mEPsslQTvORNmF0C0OOtigXbAP X-Gm-Gg: ASbGncuowohmUnDhy/ZSKJz539rYrAeTBRFGvOYmUgBgTfkITuCqmrwFB6qSgGSZAkM TSUSPvQQJSuw85FUxK4c0Y0/cuk6tN1H4brGGBqv6oKAYK3REkYR76NwUyXpzxs4LxkR6vs8VeW LzhYavzyMvvZ/Z3CJeUEvIAUCZwJ1R0yKUPHPLdcjDGg22YUB61Qy7nu8ilu1gLcjDEhKTXKhaq vU+907XVUszExmJslIwaSkTACv/s/JqcmdfotyQ8HEUdK/eSyhxswsFv5NFGaVwDh5idHeAJ6Gv 8pwORQMKHxWLaDQ6EqWnySAadbVpG0Vi7Skj+N+6viwez59FIwOtE5tTb5RmRZwSOw== X-Received: by 2002:a5d:5f4a:0:b0:385:df84:8496 with SMTP id ffacd0b85a97d-38c5194ca26mr2531093f8f.3.1738151887086; Wed, 29 Jan 2025 03:58:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7JXtANqVSB26MQ84y3Q20UL5y0GbKL9q7LZjVMoQlUkfabdqXk/TfkO91TOMW4G3rYudCgA== X-Received: by 2002:a5d:5f4a:0:b0:385:df84:8496 with SMTP id ffacd0b85a97d-38c5194ca26mr2531049f8f.3.1738151886670; Wed, 29 Jan 2025 03:58:06 -0800 (PST) Received: from localhost (p200300cbc7053b0064b867195794bf13.dip0.t-ipconnect.de. [2003:cb:c705:3b00:64b8:6719:5794:bf13]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-38c2a1bad87sm16858323f8f.74.2025.01.29.03.58.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Jan 2025 03:58:05 -0800 (PST) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-doc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org, nouveau@lists.freedesktop.org, David Hildenbrand , Andrew Morton , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , Jonathan Corbet , Alex Shi , Yanteng Si , Karol Herbst , Lyude Paul , Danilo Krummrich , David Airlie , Simona Vetter , "Liam R. Howlett" , Lorenzo Stoakes , Vlastimil Babka , Jann Horn , Pasha Tatashin , Peter Xu , Alistair Popple , Jason Gunthorpe Subject: [PATCH v1 0/4] mm: cleanups for device-exclusive entries (hmm) Date: Wed, 29 Jan 2025 12:57:58 +0100 Message-ID: <20250129115803.2084769-1-david@redhat.com> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: jBUHCeuKkzjSTbnTGcH5Zt0p52I9nSDEUB4RPHsT53o_1738151887 X-Mimecast-Originator: redhat.com X-Rspamd-Queue-Id: 34F3840012 X-Stat-Signature: nazo3cdjdonqynq6prrcxcxhtdkurhgy X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1738151890-664517 X-HE-Meta: U2FsdGVkX1/1QKDuTLhW2U1SF/7bPtm0HaWQAZ+WgaDlYlerBOMv7DKzW+EpsqRnUTBLzk3ZXsNNkH9WdLRRMW58N/wtaXc/tsYb2zb3H/6nY0ojdFnrH4hvy00y7CSsmWvD/VF2qV9gsYkpelXeW+k3XcYyiTeAFgD8ORQeguYFnlewgPMOf2/xoFJ/h6gTGHZheJRDdTeYpQ2CuJ8L3vu6CCBAh7pGueC/aPrOHJnz+ShmDQaV0RufZR31h4DVBz9axwUmNe6kYPPJFc0jKMELU0CogzbIGi0Skn41m0P+gTEdBsyGoihMdQYS15WLn1gjPLDfxpwQF8LDOxglK0R1Saa0IXuD2ovsAIU6IrUieCFUF+od7bXW+44X27ahPKzA5E9TxDUldRgi8zAh9j5LWltt2ZBNhdyef5GHzCH0gNkjjKempimcWmiWlx17K7kl2AUXFxMhRGttDnqhaHRlM4NBc5qifsdigMugO3gglWAq1f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GchomhmhGmi9Ko8juK2eUeBVGkRJ3KPO7q1i+FtaQfxqwqS2nYRKocz4l2s1D4On2/y19Jhy1U2TEyWHTtgXwALuhQ7XUBM9jWe1lQfG1UKg2YmX6rNYG6/mAPFsA0jtYGfk/TFv6G8dqqP7v3ZW1qfi2sN8ej17EncZnv3FLhcCawLOGTIqHy6EWfTX4TOlb1cj0ny6BjH8JtbES5KJcjlM= 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: This is a follow-up to [1], performing some related cleanups. There are more cleanups to be had, but I'll have to focus on some other stuff next. I might come back to that once I'm stuck on (annoyed by :) ) other things. Cc: Andrew Morton Cc: "Jérôme Glisse" Cc: Jonathan Corbet Cc: Alex Shi Cc: Yanteng Si Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich Cc: David Airlie Cc: Simona Vetter Cc: "Liam R. Howlett" Cc: Lorenzo Stoakes Cc: Vlastimil Babka Cc: Jann Horn Cc: Pasha Tatashin Cc: Peter Xu Cc: Alistair Popple Cc: Jason Gunthorpe [1] https://lkml.kernel.org/r/20250129115411.2077152-1-david@redhat.com David Hildenbrand (4): lib/test_hmm: make dmirror_atomic_map() consume a single page mm/mmu_notifier: drop owner from MMU_NOTIFY_EXCLUSIVE mm/memory: pass folio and pte to restore_exclusive_pte() mm/memory: document restore_exclusive_pte() drivers/gpu/drm/nouveau/nouveau_svm.c | 6 +-- include/linux/mmu_notifier.h | 4 +- include/linux/rmap.h | 2 +- lib/test_hmm.c | 35 ++++++----------- mm/memory.c | 54 +++++++++++++++++++-------- mm/rmap.c | 3 +- 6 files changed, 54 insertions(+), 50 deletions(-)