Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp517565lqt; Fri, 19 Apr 2024 02:45:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVQD7++9qWMM5EXYEVm9LC4rMiiBHjHTuYGSdV0UcbrHNpMXZx4h8asZItQ/jEOcVt/YS7ABqZvjNrfysZOEUM3C8F4bM7gGqk1yOjYBw== X-Google-Smtp-Source: AGHT+IGw/CgBay7wlAlo4v9BZGa3z3br8oK+5etTu2rriOg5nZSUHW7xL2J2ydWsjS9wTalw9mxP X-Received: by 2002:a50:9b51:0:b0:570:5b9c:3f25 with SMTP id a17-20020a509b51000000b005705b9c3f25mr1378732edj.26.1713519930639; Fri, 19 Apr 2024 02:45:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713519930; cv=pass; d=google.com; s=arc-20160816; b=Gx5sa7SnJj+4NK1aLV+pGcYeVOytfil8P12d5SEnAbsTf28LrqlmDie0K6/f/BaOkY ini0t4ZPpZ9sYlWaQR9O4TLpmuBBa0M+EDuxm3nld18vzF2bj6MRz6BFpbhcAZrEUaA7 Czyat+zCcAFkQwwfAKNLP5+DujAQvG3z4TNZxaRIDIe/iaiILOpXZWnZL2FuvRTvjaKR RpFc28TSbTx55jlv0gj8n9FQsWn/FokCcx3USdlHjv77g6Ufw2gVLnq0X752JWRCLMPs Aiu1/5gpSGIYWToDxyxl95Ip+wWxRWKGVyRQXEKeb87sNek3wNwNHtr8kkNN7vM81hdV YNww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:from:references:cc:to:subject:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=MCoyntaCRZuUkWRpN1//7gRrd2DlONoI5NwEvNCqyxk=; fh=ND2yCagdEEcJFMgAAdRwZKQbzkxLeW3q6Un+I38AThI=; b=aUR9dUpkMdrxIoIfZigHwy1o0v0iT9oxyEgUbcgAR6U9DinUCC3Ib2W00JiDTHtKhJ 1XerEvz8XgK3/ibPe1bggGkgpiChnjAzJ+zPQ8YPruQPWnyThvc8mINegJ8oUaoTOXdv YO4m6oXvDVZQf+xLbNQ+w8lcoYn2+mA83pRdz+uaxtNu0t653wzpPTffluudPAkDY/iV AZpRNMu6CYQ3rD7kdtVtAbRQoiAIU41pjbggDOJS5Ouzi8UfKn+Ud2TWguKvQ82X+7mT aN0avYaKTpeu9FL3CgsjoPfnSTIunho0rrnfuCDbzUjaU+MkT2YbtPMakA4nzaduaH3s a9Ew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JPN0L4D0; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-151245-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151245-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r1-20020a50aac1000000b00571b67239f2si1915958edc.523.2024.04.19.02.45.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 02:45:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151245-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JPN0L4D0; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-151245-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151245-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 090151F21782 for ; Fri, 19 Apr 2024 09:45:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 431A67BB0C; Fri, 19 Apr 2024 09:45:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JPN0L4D0" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 8357D73518 for ; Fri, 19 Apr 2024 09:45:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713519922; cv=none; b=l7ZuxCygZNjWFOrmg6qOd2PVsAiLf91we0k0p60zV2sbc9VZf9aKnIMKvanI95clGeGhm/ImLC11y4Vc5V3cd+vYDbvZpX/HPyCo4nB0Tj+H13Va5yx6EEMo5rS/pGJAyhufJ5vd7s4nGV0X3Hevx3W+XSv9YtwBkSRwnlO9rvM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713519922; c=relaxed/simple; bh=HMHZQ81dP0SN0T90W2TrPTOiS2bN4YfJlg8/lAMBsaQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MpJ3r5KeWL5OqWzpJpYAeS/rpJ5G7OrYGh0ftyvpZS3j0WuIpQUvT+bOk+HcnwN3lo3YzOPATBvssB/bwmSfdnUbxGR93j6q5lCUKE2SjZhAQlCXpfA6z+1GTDx22vRKDg8ntCPaK3yRsURAQf9u1vcp0ePaOEjLCH0iMPwvgdw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=JPN0L4D0; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713519919; 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: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=MCoyntaCRZuUkWRpN1//7gRrd2DlONoI5NwEvNCqyxk=; b=JPN0L4D06QbjOY45vwyDtRzJhEwWD8nE+qAV4pYr5fo989HARQXCbIh/4Dkht6gOCB7gBH Bltx/rEqOQD3FJSLyieJZ/3iwiq6HnERC5yNNwstFP4qXFmcHRdDqXMRj4IY05SvG4iJp8 n72qFijZwFJXrREMUG9kPxy3RqeJ6ug= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-548-wklCB95CPHWZ8Gtr3M24wg-1; Fri, 19 Apr 2024 05:45:17 -0400 X-MC-Unique: wklCB95CPHWZ8Gtr3M24wg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-41895b0a62cso15235575e9.2 for ; Fri, 19 Apr 2024 02:45:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713519916; x=1714124716; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:from:references:cc:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=MCoyntaCRZuUkWRpN1//7gRrd2DlONoI5NwEvNCqyxk=; b=MpROAw3Ac9ecqJMBwD4XQNYAnvGiNxNAkfA+/NAokrjVhnebgjH9+DED5CzmBrBAYN Jlygghgh10YVgdS5UrBJS+bx+xSgWJ4/VpERG6j0KRGsePmcGnryJYQTc+hkoMxsb/Ho MmTdwkrOt39QnFoENyyBoQkQXKcwx089X5jevJ6gzsHneMNnVGhuRoJDNetmwmngOgVg ua0CM13fQ7C/09Qmp+peTjpbbR+jQUDybC3BbMmh44aw9qWekMTrsckAt3Zi66b13FMq +UozbGt6oPmN6keAXUsfQDXHHRB6b7QRGj8HA6zSnAEKgQB0V7ZHw2ioF2NI9utMgl/Y K0AA== X-Gm-Message-State: AOJu0YyHLlc1JaNUVl9/satIraGt9KaG6CAj4aOXfo/hWg5Qk1kAAO38 XZUvl/sgyQi4qWlbPRVnVhDoL9QH5Y5iL/wk1TWxv3JNiUJjnxbFb1tBdUwK9DXgIF09cH+m5DY hQE8RKPp4waoKHbcEZZbZh52gxXWwUWY6dcQt09F3hO/LwS7xsnB3iHjmdsyFVw== X-Received: by 2002:a05:600c:1c9b:b0:416:4641:5947 with SMTP id k27-20020a05600c1c9b00b0041646415947mr1253933wms.34.1713519916654; Fri, 19 Apr 2024 02:45:16 -0700 (PDT) X-Received: by 2002:a05:600c:1c9b:b0:416:4641:5947 with SMTP id k27-20020a05600c1c9b00b0041646415947mr1253904wms.34.1713519916154; Fri, 19 Apr 2024 02:45:16 -0700 (PDT) Received: from ?IPV6:2003:cb:c716:f300:c9f0:f643:6aa2:16? (p200300cbc716f300c9f0f6436aa20016.dip0.t-ipconnect.de. [2003:cb:c716:f300:c9f0:f643:6aa2:16]) by smtp.gmail.com with ESMTPSA id p15-20020a05600c358f00b00418ef96472asm4485815wmq.0.2024.04.19.02.45.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Apr 2024 02:45:15 -0700 (PDT) Message-ID: Date: Fri, 19 Apr 2024 11:45:14 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 0/5] arm64/mm: uffd write-protect and soft-dirty tracking To: Shivansh Vij , Ryan Roberts , Catalin Marinas , Will Deacon , Andrew Morton , Shuah Khan , Joey Gouly , Ard Biesheuvel , Mark Rutland , Anshuman Khandual , Mike Rapoport Cc: "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kselftest@vger.kernel.org" References: <20240419074344.2643212-1-ryan.roberts@arm.com> <24999e38-e4f7-4616-8eae-dfdeba327558@arm.com> From: David Hildenbrand Content-Language: en-US Autocrypt: addr=david@redhat.com; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9 PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHv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AB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6 3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8 kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt WNyWQQ== Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 19.04.24 10:33, Shivansh Vij wrote: > (Sorry about the previous HTML email, accidentally used the wrong email client) > > Hey All, > >> On 19/04/2024 08:43, Ryan Roberts wrote: >>> Hi All, >>> >>> This series adds uffd write-protect and soft-dirty tracking support for arm64. I >>> consider the soft-dirty support (patches 3 and 4) as RFC - see rationale below. >>> >>> Previous attempts to add these features have failed because of a perceived lack >>> of available PTE SW bits. However it actually turns out that there are 2 >>> available but they are hidden. PTE_PROT_NONE was previously occupying a SW bit, >>> but it only applies when PTE_VALID is clear, so this is moved to overlay PTE_UXN >>> in patch 1, freeing up the SW bit. Bit 63 is marked as "IGNORED" in the Arm ARM, >>> but it does not currently indicate "reserved for SW use" like it does for the >>> other SW bits. I've confirmed with the spec owner that this is an oversight; the >>> bit is intended to be reserved for SW use and the spec will clarify this in a >>> future update. >>> >>> So we have our two bits; patch 2 enables uffd-wp, patch 3 enables soft-dirty and >>> patches 4 and 5 sort out the selftests so that the soft-dirty tests are compiled >>> for, and run on arm64. >>> >>> That said, these are the last 2 SW bits and we may want to keep 1 bit in reserve >>> for future use. soft-dirty is only used for CRIU to my knowledge, and it is >>> thought that their use case could be solved with the more generic uffd-wp. So >>> unless somebody makes a clear case for the inclusion of soft-dirty support, we >>> are probably better off dropping patches 3 and 4 and keeping bit 63 for future >>> use. Although note that the most recent attempt to add soft-dirty for arm64 was >>> last month [1] so I'd like to give Shivansh Vij the opportunity to make the >>> case. >> >> Ugh, forgot to mention that this applies on top of v6.9-rc3, and all the uffd-wp >> and soft-dirty tests in the mm selftests suite run and pass. And no regressions >> are observed in any of the other selftests. > > Appreciate the opportunity to provide input here. > > I personally don't know of any applications other than CRIU that make heavy use of soft-dirty, and my use case is specifically focused on adding live-migration support to CRIU on ARM. > > Cloud providers like AWS have pretty massive discounts for ARM-based spot instances (90% last time I checked), and having live-migration in CRIU would allow more applications to take advantage of that. > > As Ryan mentioned, there are two ways to achieve this - add dirty tracking to ARM (Patch 3/4), or tear out the existing dirty tracking code in CRIU and replace it with uffd-wp. > > I picked option one (dirty tracking in arm) because it seems to be the simplest way to move forward, whereas it would be a relatively heavy effort to add uffd-wp support to CRIU. > > From a performance perspective I am also a little worried that uffd will be slower than just tracking the dirty bits asynchronously with sw dirty, but maybe that's not as much of a concern with the addition of uffd-wp async. > > With all this being said, I'll defer to the wisdom of the crowd about which approach makes more sense - after all, with this patch we should get uffd-wp support on arm so at least there will be _a_ way forward for CRIU (albeit one requiring slightly more work). Ccing Mike and Peter. In 2017, Mike gave a presentation "Memory tracking for iterative container migration"[1] at LPC Some key points are still true I think: (1) More flexible and robust than soft-dirty (2) May obsolete soft-dirty We further recently added a new UFFD_FEATURE_WP_ASYNC feature as part of [2], because getting soft-dirty return reliable results in some cases turned out rather hard to fix. We might still have to optimize that approach for some very sparse large VMAs, but that should be solvable. "The major defect of this approach of dirty tracking is we need to populate the pgtables when tracking starts. Soft-dirty doesn't do it like that. It's unwanted in the case where the range of memory to track is huge and unpopulated (e.g., tracking updates on a 10G file with mmap() on top, without having any page cache installed yet). One way to improve this is to allow pte markers exist for larger than PTE level for PMD+. That will not change the interface if to implemented, so we can leave that for later.")[3] If we can avoid adding soft-dirty on arm64 that would be great. This will require work on the CRIU side. One downside of uffd-wp is that it is currently not as avilable on architectures as soft-dirty. But I'll throw in another idea: do we really need soft-dirty and uffd-wp to exist at the same time in the same process (or the VMA?). In theory, we could have a VMA flag that defines the semantics of the bit and simply have arch code use a single, abstracted PTE bit. Requires a bit more work, though, but the benfit would be that architecturs that do support soft-dirty could support uffd-wp. [1] https://blog.linuxplumbersconf.org/2017/ocw//system/presentations/4724/original/Memory%20tracking%20for%20iterative%20container%20migration.pdf [2] https://lore.kernel.org/all/20230821141518.870589-1-usama.anjum@collabora.com/ [3] https://lore.kernel.org/all/20230821141518.870589-2-usama.anjum@collabora.com/ -- Cheers, David / dhildenb