From mboxrd@z Thu Jan 1 00:00:00 1970 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 1BC68CDB483 for ; Thu, 19 Oct 2023 20:02:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 83552800BA; Thu, 19 Oct 2023 16:02:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7BE9E800B8; Thu, 19 Oct 2023 16:02:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 63919800BA; Thu, 19 Oct 2023 16:02:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 4E766800B8 for ; Thu, 19 Oct 2023 16:02:56 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 18578160F87 for ; Thu, 19 Oct 2023 20:02:56 +0000 (UTC) X-FDA: 81363284352.26.C6F6CDB Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com [209.85.128.180]) by imf03.hostedemail.com (Postfix) with ESMTP id 3BBA720028 for ; Thu, 19 Oct 2023 20:02:54 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="u/gMOZ6J"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf03.hostedemail.com: domain of surenb@google.com designates 209.85.128.180 as permitted sender) smtp.mailfrom=surenb@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697745774; 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:in-reply-to:references:references:dkim-signature; bh=d4h8OXoW9StQ+YypbHzqEhLaogqFHJKP7focuWdzzM0=; b=tT3+M7k0EoO+vHBXe6O3dX0hrnKdsI0HnF2xGKgMfvvf6AUr2V25bKqfgEidPntfsVc8D6 lTjud5uxvrrsKv8xSA2RF9fpgeXhdxesycOPsHFdiImcp7Oj1YXmiBVsZYj7QtkYz3bkl/ Nxt44flAmvEokuPdVHR5w1iw4xDrBHQ= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="u/gMOZ6J"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf03.hostedemail.com: domain of surenb@google.com designates 209.85.128.180 as permitted sender) smtp.mailfrom=surenb@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697745774; a=rsa-sha256; cv=none; b=7Y23kh5qzCoPFfCcSvM9Pm1RGqPnhxRESbColHVs/92wnbYe6n5Aa2Vl0xrf+K2Seo36m1 N7gRp1Wm4EPxS0R0WVK78QrwPlaPj8QQtU1tndMOLWPLY5KPB80H2ieHWx/s+NXDe2f4B0 JLQ0ySRFYComsUp4zX9Jz4axfoHlPw0= Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-5a7ad24b3aaso147267b3.2 for ; Thu, 19 Oct 2023 13:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697745773; x=1698350573; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=d4h8OXoW9StQ+YypbHzqEhLaogqFHJKP7focuWdzzM0=; b=u/gMOZ6JJKz0FHIJuBob5dwFge3TmpuHsLQcZ+t8mmTpd2BjQCjpcrVfWPFyOOWU8k nWNg+kuCwyC1ROSdRabkqMM7Lf9TzjA9gyaWVNxhMUrHm2n0TJWtMFIWppKAT2Ildh51 7eXGMYhTtyq5do9So5oJ3V/ybUT45dlRZ+c/9VbnJoRgTnDS7GS3B1ml48vZkj3vhIQm ZQyojfdyt2wLs+muwsCjnlwMAN4HUY6MMlOTMf5HNeutF+ZCflFw0ngF058EOO/4q5+v D9ppO7GDDhHfjZCa6gickEfTTl+7VkD+nxtRnHt3r2bAUwQbMRowHWi+oJqhce9kGfKd TOBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697745773; x=1698350573; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d4h8OXoW9StQ+YypbHzqEhLaogqFHJKP7focuWdzzM0=; b=Mf71uMsFiEotqhWPvpZopVcxuKa7oPJb2TI4hd2G+A4oZE+n0nT4K/fw6y7u7/BaaE 7ZqU0rMN5d75KT7VK9w5zT+MR5JBEzpdJtDigfLucjX8CeXE5MxBNIfexR1q8JgBWJIe lB/WLdd+HTLaSeAR/+L5ynECr98ieCVe+UF+4m7PY+v5f+/jigDw+sZD4jOGCVodgaKf c2Jdycpes0VFmkoPpJfgDui5u2mSDto5QTr/L25i/qO7dPI3LbU05CS97TUoioKryh2C PGFxIMVUDZumKZvZIYskckDeM1NQdI4hsBVJE+0Rzm56iE3d94BnJDYP3LGzqBz1anHl qS1Q== X-Gm-Message-State: AOJu0YyImn5oJ3r/V8i8HRRFyOXvMQY6CZPGC7gju3f+R3Z566xSvalp RP3PC6ZgLjaDzd+uj/oftzQkvNZxMjU0iuMvNwUgIQ== X-Google-Smtp-Source: AGHT+IFpMZ2iRVo3MJ/6b0SYAOb/GvPEGfec2JTMINMBnMybc9wPakvZR4d3FtbutJYe9Xvp6xxVYZOi+t9uQ2RUYpQ= X-Received: by 2002:a0d:cbc1:0:b0:5a7:fbd5:8c1 with SMTP id n184-20020a0dcbc1000000b005a7fbd508c1mr3222768ywd.17.1697745773027; Thu, 19 Oct 2023 13:02:53 -0700 (PDT) MIME-Version: 1.0 References: <478697aa-f55c-375a-6888-3abb343c6d9d@redhat.com> <205abf01-9699-ff1c-3e4e-621913ada64e@redhat.com> <12588295-2616-eb11-43d2-96a3c62bd181@redhat.com> <8d187891-f131-4912-82d8-13112125b210@redhat.com> In-Reply-To: From: Suren Baghdasaryan Date: Thu, 19 Oct 2023 13:02:39 -0700 Message-ID: Subject: Re: [PATCH v3 2/3] userfaultfd: UFFDIO_MOVE uABI To: Peter Xu Cc: David Hildenbrand , Lokesh Gidra , 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, jannh@google.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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 3BBA720028 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: hbat568pspgu46ci5fgag1hnyxi5en5z X-HE-Tag: 1697745774-607044 X-HE-Meta: U2FsdGVkX1+80kA/eHmurTWnMElGiIERx98KvsfBqdrPEhFl2UNIHplzOV4I+K4w3I7MR2904ghissX7wOBmde6XfOs4gAS+DNP557To5RdtjQa3LilsLQTP36NjOW5oJZ97XDUxeWmrbTAWAOyRNzgxDv7TSqMVJAoc3TZpqJ2jI/38i96Os4PYHWLvvRnpdMceVUnSJuJGWEyJmN7uYrIW7/bUHULgasW7MyZeYNQwuhdFigNwv1w4xNA5PsIJ6BNmW/5/R0mJqy+eFfXGtAzlwvf7EiqTV21pdluAzFGxyvIhEhICg+swkx4gx4ppHOsg+wS9f6sglUbVJKAZPDp4CniOCOIBrS/sZvSRC/jjyUbNjUwXqSBHBUKngZVxDSIHGwQXhUL5aYTmn1br1WnrHbcnX86zv1Jkn3chUhFkIqh10zA2c0gIRiwerf3XUVmESCW7nGHHIKPllTOI1Go4S/zEzBsRTLj60fVUWYJ4+YRI0Psqd9jMJIWA/EDPkOnvKqNDQ2YiOgRachLqgTfUmNNz+nzLJDGZcuiZ46Dh/vnS+jt4eGJcjFxNjp1zs/m/jn6nA/ZwXg6Q03UX44Q2pROExPFJEambz8ViapaE+uiVr/9MlvoEVcKmrJU6lsTglLfCbj4vCfoJ3+Nw99UsBOIINlwKkRZelplEtZALl1tOwaSmlDXiE3vLUIpRvEDu3XIWR/86Gg6rDQYP3ImMJFTZRK6mXOTicqoRCZVOy/VSI/bEcm/Il23B5ChM603QK0vG1D6k6eEjkRZZhhilIRcbsOhEbYNQEIXFw95VR0b0wq2RxBEJZ1OfFodgRH31hM9n30Ff7BSd3SL5978VPZ8xC0j3OK8f7Me1C2h07f72ESKC2dpgep1L6pyEwg/4YXKXJtqCVGsWcOabB0nHGoQXOVWB7KR1l/lqT9n+D6y87RtPIkKv24U/6dom6kFKyZOcNku3tQt8L93 j628L44y oc7kFvjD50f4h2XDYsfCnzFoVlxYjEoMT2TbKKn+V/38MJ4jUNT4Hia/e34kwS7xM3RXnWxXpRCKpPpNg4JM7wXOJdaETo1CB6scBFpA/1teMcvpVKTYMeb5DkawOQQ1Npl9CFe55lXUavGuSGKJ3HS2ziFd7ssJZ2KJDnMYB/JjASCYPsEQ7Px1H5QgQApB5xEKY+SVCFXG/H88kLkc66Mf/3YPj0J3yldz80QNdhD4VXjqznlH8nisMnAS6OzDHYi0nqEyAG7GiKHXo8wxILpFyOV3flAeQGivAiBwhGYSPNfU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.010511, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Oct 19, 2023 at 12:53=E2=80=AFPM Peter Xu wrote= : > > On Thu, Oct 19, 2023 at 05:41:01PM +0200, David Hildenbrand wrote: > > That's not my main point. It can easily become a maintenance burden wit= hout > > any real use cases yet that we are willing to support. > > That's why I requested a few times that we can discuss the complexity of > cross-mm support already here, and I'm all ears if I missed something on > the "maintenance burden" part.. > > I started by listing what I think might be different, and we can easily > speedup single-mm with things like "if (ctx->mm !=3D mm)" checks with > e.g. memcg, just like what this patch already did with pgtable deposition= s. > > We keep saying "maintenance burden" but we refuse to discuss what is that= .. > > I'll leave that to Suren and Lokesh to decide. For me the worst case is > one more flag which might be confusing, which is not the end of the world= .. > Suren, you may need to work more thoroughly to remove cross-mm implicatio= ns > if so, just like when renaming REMAP to MOVE. Hi Folks, Sorry, I'm just catching up on all the comments in this thread after a week-long absence. Will be addressing other questions separately but for cross-mm one, I think the best way forward would be for me to split this patch into two with the second one adding cross-mm support. That will clearly show how much additional code that requires and will make it easier for us to decide whether to support it or not. TBH, I don't see the need for an additional flag even if the initial version will be merged without cross-mm support. Once it's added the manpage can mention that starting with a specific Linux version cross-mm is supported, no? Also from my quick read, it sounds like we want to prevent movements of pinned pages regardless of cross-mm support. Is my understanding correct? Thanks, Suren. > > Thanks, > > -- > Peter Xu >