Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2218566rdb; Tue, 3 Oct 2023 14:09:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFnMWnQ9IfUQKCPPwE5R4sS7aeKBqyNlumqMq9oKspXDI4zsfukMgxs3Rl5GLW72BaqWAPy X-Received: by 2002:a17:903:54d:b0:1c6:1206:c5b0 with SMTP id jo13-20020a170903054d00b001c61206c5b0mr595111plb.67.1696367369258; Tue, 03 Oct 2023 14:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696367369; cv=none; d=google.com; s=arc-20160816; b=gYQ+6jJBmzt+P8CSf0bOi69T8q4PxPDZu9zwheZIXb0WQ1/pfrxku8nMC7pa3p15Y+ vWXDVaBSXMwqW/aqcrQe2/us/UyLAjxNE5F7LcCWO35Uw07kUYmviRtIk2jScG5DABHa /KbYBdr0FnAwvLJKdO6dvkbRG8A771fwHXIXwvcKj9p5AQvCnZbeizgTQeIxYBO9pNn6 RKh1T33BTFtIRqZ3IhSos84zrMA899DCTZao73W3Q3A7VBIzhhWfKeRNS+drdp+kbIE5 alDutsQEx4d9mDbeEBy7KIvDMaTtyu7DPITt3auRNcoGQk40LdWoaFrNxjNL8ur6gxpY M1BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=iZqudPdFmsqAX0i25tQhq4N6QuLZbaMC0GnCxXAloB4=; fh=Beax5dxlAtKIAjylm9GfMm6crKDU5mO1OBO2+v8iZOk=; b=UwIZ/vCvXAMJngMtlQ/C60Wqe4jHLX9JGWSu7e2ueIWXtV+/KfSK3xxyFZI3AuwZm9 WbmuQQxf4NbgfZGlDxw4/e1Tc4C503fjn3gb7ZBQIGnARjVYHxF2Fux9+tEkRAuVNAFj N5gmDZPOyROTXRMA/fFS2tY7V24dMAWlrQlGTi5m09iGhS0EeG903qKaVmzZpBciKTT/ w2mDCdNmyXYHb4FFUNlYNZzCBK2ksPWvjDFRqJk0oIIX6huAbamhZjoFnpZuD66lZX5+ PjwQzmXEBbI+sYZwUNgVXySCJwEIXk1lW0f9T2LOzLJPzXEOW9DehUzXgV+/6/vY50aT BEeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c9UaHypH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id u18-20020a170902e81200b001b8af83d939si2348514plg.537.2023.10.03.14.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 14:09:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c9UaHypH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D9A2381222A3; Tue, 3 Oct 2023 14:09:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241136AbjJCVJR (ORCPT + 99 others); Tue, 3 Oct 2023 17:09:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232236AbjJCVJQ (ORCPT ); Tue, 3 Oct 2023 17:09:16 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1C7683 for ; Tue, 3 Oct 2023 14:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696367309; 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; bh=iZqudPdFmsqAX0i25tQhq4N6QuLZbaMC0GnCxXAloB4=; b=c9UaHypHg+Ox5IW82cqS2rl2voJV/9EYq/TddKRyYx07i9kGqdNMdMGKtNqeXPpWHvCoCO ck5F24qJ8AqBYvWhE/jjiv6A3JWF3AxgNICg4A+PLVbrk+PKHL8LOnWGh7d5geDVnEFrsl brdwVepy6GY4fPkedELjAFMFc9kkDgM= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-208-0XS9oMMGPxWCPfgVOOQV1Q-1; Tue, 03 Oct 2023 17:08:11 -0400 X-MC-Unique: 0XS9oMMGPxWCPfgVOOQV1Q-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4059475c174so11224965e9.0 for ; Tue, 03 Oct 2023 14:08:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696367290; x=1696972090; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iZqudPdFmsqAX0i25tQhq4N6QuLZbaMC0GnCxXAloB4=; b=rGY6wkuTbANfN/7WfAkophuarKyLDE/M1uphDQOEZZ+vWX/9AMWf69qYAYfi72N7mb e6xsT2qgx8eDMyFlyBwb5JiuzQztMdh3sOgcAEQwlBm5YXaHFyH+nVAarkGmQPZmWtp5 V0dUDNFn/mImmApqWvgoxTudJDz7mnyA3KPPxzAOzLO7biFGcDIFdDN41efLk6BkOWmf E5+Ou1byZgYU46DoIBC2O+ndMNEFYwgZ7p6ecJMM4ND46LYQnP0AmB2qQ6Vfvr+z2gIF 7d/dF5mASr7Sri0bPIfXfx6qrDciLhHQkPa6uUwHSp1NBrrA4cjAy1XVN9CYozPPXN1I CjlQ== X-Gm-Message-State: AOJu0YynNuwfvYJ6P4jSzjLuVo8aSWiJ0oqIJi1UM5G1moNWPmE7O7s0 TozQtbopXFxRcuhiD3QoLQWGeT0PsbDJMrqZKW9Y/+9fMFrYrWu8AjoBTc4jZ24M+l4km2zDUOH Ds+LLjubI+VVduQ/f1Rs96Y/Q X-Received: by 2002:a7b:c451:0:b0:401:aa8f:7562 with SMTP id l17-20020a7bc451000000b00401aa8f7562mr649093wmi.11.1696367290208; Tue, 03 Oct 2023 14:08:10 -0700 (PDT) X-Received: by 2002:a7b:c451:0:b0:401:aa8f:7562 with SMTP id l17-20020a7bc451000000b00401aa8f7562mr649063wmi.11.1696367289788; Tue, 03 Oct 2023 14:08:09 -0700 (PDT) Received: from ?IPV6:2003:cb:c736:1b00:e1fc:b01b:70f5:1985? (p200300cbc7361b00e1fcb01b70f51985.dip0.t-ipconnect.de. [2003:cb:c736:1b00:e1fc:b01b:70f5:1985]) by smtp.gmail.com with ESMTPSA id z15-20020a1c4c0f000000b003fee6e170f9sm31441wmf.45.2023.10.03.14.08.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Oct 2023 14:08:09 -0700 (PDT) Message-ID: Date: Tue, 3 Oct 2023 23:08:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v2 2/3] userfaultfd: UFFDIO_REMAP uABI Content-Language: en-US To: Peter Xu , Suren Baghdasaryan Cc: Lokesh Gidra , Jann Horn , akpm@linux-foundation.org, viro@zeniv.linux.org.uk, brauner@kernel.org, shuah@kernel.org, aarcange@redhat.com, hughd@google.com, mhocko@suse.com, axelrasmussen@google.com, rppt@kernel.org, willy@infradead.org, Liam.Howlett@oracle.com, zhangpeng362@huawei.com, bgeffon@google.com, kaleshsingh@google.com, ngeoffray@google.com, jdduke@google.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com References: <85e5390c-660c-ef9e-b415-00ee71bc5cbf@redhat.com> <9434ef94-15e8-889c-0c31-3e875060a2f7@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 03 Oct 2023 14:09:27 -0700 (PDT) On 03.10.23 22:21, Peter Xu wrote: > On Tue, Oct 03, 2023 at 01:04:44PM -0700, Suren Baghdasaryan wrote: >> Ok, I think it makes sense to implement the strict remap logic but in >> a way that we can easily add copy fallback if that's needed in the >> future. So, I'll change UFFDIO_REMAP to UFFDIO_MOVE and will return >> some unique error, like EBUSY when the page is not PAE. If we need to >> add a copy fallback in the future, we will add a >> UFFDIO_MOVE_MODE_ALLOW_COPY flag and will implement the copy >> mechanism. Does that sound good? > > For the clear failing approach, sounds all good here. > > For the name, no strong opinion, but is there any strong one over MOVE? See my reply regarding MOVE (+zero-copy optimization) vs. REMAP. Just my thoughts. REMAP reminds me of mremap, which would never perform any copies, because it can just do more expensive page remappings (modifying VMAs etc.). > MOVE is a fine name, however considering UFFDIO_REMAP's long history.. I > tend to prefer keeping it called as REMAP - it still sounds sane, and > anyone who knows REMAP will know this is exactly that. Sorry I have to ask: has this ever been discussed on the list? I don't see any pointers. If not, then probably the number of people that know about the history can be counted with my two hands and that shouldn't be the basis for making decisions. But again, remap vs. move is for me a semantical difference; and as I am not a native speaker others might disagree and I might be just wrong. -- Cheers, David / dhildenb