From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 770D6E555 for ; Sat, 27 Jun 2026 08:59:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782550797; cv=none; b=h30oJ/jDpfL7XlhXUybCuvIf/XlQ5CkUdRuofngt5yDxiDytyEWfnXnx2OT6U2sInLcuTTMeZCs/f7DQrEmNIVN9lB7rkL4pbAynaLTndlWnwtufpbxKIvQenLqrk1FxCqg4NVC5H5xJhkSJTh/XCPDnVZ3Pn7iqMR1DSN1c08A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782550797; c=relaxed/simple; bh=DiRchUqCeCkyTRDt4W9KTrhpTupGtGuVZRvZqZ5pm7U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N59MNkNl5NL7479/4i8+eSQNM8vJLTq+lvd0jACfO7AiTpUq2V8qouWosJhvdzaajg4ra9ajSQebDV0bzeW1Yr9EHIEijwJ5xpQ7CvtH90Umiz9No8UtoWXoyqxjyp8no1eKcOINVHDMmP2CTcjBdaU1qKd/Qvwzl0B5eU24C7A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QFP15Yvz; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QFP15Yvz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A76571F000E9; Sat, 27 Jun 2026 08:59:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782550796; bh=9AYyHhsOmrkOkHlnQ8kt3V/chet8d/72eUus0xZyb6s=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=QFP15Yvz/No2SgGk1kPy51T0lrTgCp3RvoVAQKRGq3FwcrpVhBCmHwf5sLmX7gALc s7pgeKTC/YH+vYPEQQvYL9AuE5oeIDNBklqx3/Y4fSj+DkRdXGKV7z7HpE4d2jdiyG 98jWurSeZA8J6pNz1O97UKkTVL8Dl9yOuLyWiyDFdkXw32vMxBO16FhFA8x/wv2EQ+ x5kf7YF2hBfHwlWnojxn3OAHnx+bkVmqCOL4kT/h2vxmwN5+AKfk0hqDbnHVMdQQnp v5wsfYeRSRfFK3UJFPI7k6cl3TjIKqB/lp208ve+ps8rNALo6uhqmLGw7v4YST1UlM 0KS9DEgKwcR9w== Date: Sat, 27 Jun 2026 09:59:45 +0100 From: Lorenzo Stoakes To: Rik van Riel Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar , Dmitry Ilvokhin , Borislav Petkov , Dave Hansen , Andrew Morton , David Hildenbrand , "Liam R. Howlett" , Vlastimil Babka , Suren Baghdasaryan , kernel-team@meta.com Subject: Re: [PATCH v2 0/3] mm: __access_remote_vm with per-VMA lock Message-ID: References: <20260625015053.2445008-1-riel@surriel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260625015053.2445008-1-riel@surriel.com> On Wed, Jun 24, 2026 at 09:50:50PM -0400, Rik van Riel wrote: > 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... > > v2: > - simplify the code, which should be ok because these copies are < PAGE_SIZE > - clean up the code > - fix locking wrt tlb_remove_table_sync_one() > - hopefully address all the other comments Please always send a diffstat in your cover letter by the way. I noticed you didn't do this elsewhere also, so please adjust your tooling to do this :) (git format-patch --cover-letter does this by default). Thanks, Lorenzo