From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 098613DD51C for ; Tue, 16 Jun 2026 19:03:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=96.67.55.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781636638; cv=none; b=rDDAapeNH/NxcXlua+CCFKMUeR8hwomF25w0HAXRPrwM47fwdG0l4UFRNUwVuJa/gUixigf1Z0FbfrccBm2bS2p+t/jV1yP2bDVWfPpjCDSeqr/p4IQDLoDSii8JPbIFd1YJIytQBOrkaE+aw/i6X6EtKBDnZOt329nYWS1nmFY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781636638; c=relaxed/simple; bh=S8BsJvF6zEh1NYK1csQzbN1lg51lDIINZMD0TD5QoMM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=N+lI7aGPWGNBavUu0AUzdjW+mhSz2Rpl6sLJVOPHUZr2jF7l7kJESg70sxmJrtuOAQKpxxEeUoxgdB427dih6uJABEvsTmQD0zm6tRQ/X4XDZS0e0kO+jryDxflfYFMdh4Gij1n4raV1u2JgQKtmfbCzYh2Ele3lJ41bfgT29jw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com; spf=pass smtp.mailfrom=surriel.com; dkim=pass (2048-bit key) header.d=surriel.com header.i=@surriel.com header.b=IXIgeFBr; arc=none smtp.client-ip=96.67.55.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=surriel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=surriel.com header.i=@surriel.com header.b="IXIgeFBr" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=surriel.com ; s=mail; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=S8BsJvF6zEh1NYK1csQzbN1lg51lDIINZMD0TD5QoMM=; b=IXIgeFBrGy0wFVwSSSiP59iIDh 8HGsh5qFq717GXuQsdxfD8wTRSkrFoh7tMRE8LvZvs7XEPTVCtYB3qHW+zfQARgwC/PRDnicA8/Hu UP68Ek/Nco2FjTZXQJDjdHE7/t97tE8wSTtykL+56RVubc09Fh95holHXlbRDcXjxMIpO6KHzKEzk LTKvEfv4IrnugHGv72p63IhouAEIorcyxvoxR7PnmFofeN7d0vRFKGQrvH6rAUgbBVpO+xSThdeWV XplP0J1GAQUjVsPJx8w7wpzVorPgFWY4sQ0dumEfTD2Hu2OETl6/3SQ03EOmguwAlLx8rP9Diqlzk qCYWWMlw==; Received: from fangorn.home.surriel.com ([10.0.13.7]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1wZZ4N-000000005GL-0uRT; Tue, 16 Jun 2026 15:03:31 -0400 From: Rik van Riel To: linux-kernel@vger.kernel.org Cc: Rik van Riel , x86@kernel.org, linux-mm@kvack.org, "Thomas Gleixner" , "Ingo Molnar" , "Dmitry Ilvokhin" , "Borislav Petkov" , "Dave Hansen" , "Andrew Morton" , "David Hildenbrand" , "Lorenzo Stoakes" , "Liam R. Howlett" , "Vlastimil Babka" , "Suren Baghdasaryan" Subject: [PATCH 0/3] mm: __access_remote_vm with per-VMA lock Date: Tue, 16 Jun 2026 15:02:57 -0400 Message-ID: <20260616190300.1509639-1-riel@surriel.com> X-Mailer: git-send-email 2.54.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sometimes processes can get stuck with the mmap_lock held for a long time. This slows down, and can even prevent system monitoring tools from assessing and logging the situation, because they themselves end up getting stuck on the mmap_lock. However, with the introduction of per-VMA locks, we can improve the reliability of system monitoring, and generally speed up __access_remote_vm under mmap_loc contention, by adding a fast path that does not require the process-wide mmap_lock. This fast path is only compiled in and used when it is safe to do so, meaning a kernel with per-VMA locks, RCU pgae table freeing, the VMA is not hugetlbfs, iomap, pfnmap, etc... The code seems to work, but could still use some more cleaning up and benchmarking.