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 X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0430C433B4 for ; Tue, 27 Apr 2021 20:59:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5E802611F2 for ; Tue, 27 Apr 2021 20:59:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E802611F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DAC886B00BD; Tue, 27 Apr 2021 16:59:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D41CB6B00BF; Tue, 27 Apr 2021 16:59:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B87CD6B00C0; Tue, 27 Apr 2021 16:59:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id 965B46B00BD for ; Tue, 27 Apr 2021 16:59:41 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4E9F0180AD822 for ; Tue, 27 Apr 2021 20:59:41 +0000 (UTC) X-FDA: 78079363362.36.D102315 Received: from mail-vk1-f181.google.com (mail-vk1-f181.google.com [209.85.221.181]) by imf08.hostedemail.com (Postfix) with ESMTP id A6C3680192FB for ; Tue, 27 Apr 2021 20:59:18 +0000 (UTC) Received: by mail-vk1-f181.google.com with SMTP id u23so9102116vkl.12 for ; Tue, 27 Apr 2021 13:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0HWA17end2mHSBOn8PRau19glHvfoApvxJN4UI4e4wY=; b=kNKfv+4q0saGnCORBqm46p0HV1suwevJ9JVbPHr0+XvghY79DC/iZyAPTAZbGnYyB8 GsVoDslhO3CtPXFtTJFi8d1kjKlo2fdd+BnIhvpxoI/3fiArqjvd8lbpl2ml1sEICYXP ArM0dSMfhO+OfBda5w/pxnXXTSJrti8/o5grX+0Alm+E4ao5/e7iFcRAsR/HXGQSsKLW odKQ7BvNIdD3QU7i1+UGWnBK/FnqkXdmn8fzWb1jS03ngBVhozHK2YuHtBb+GRFpu2Ix suwhUMmpONeubCHP/XZzACwfqYPDObWb9XpRXIhHBbRzW5nQukERhg6w6j0Bwwje4P1r Mnmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0HWA17end2mHSBOn8PRau19glHvfoApvxJN4UI4e4wY=; b=A/+hhOf8QdWCyjxoMJz6rMAB1ndNakM0eCfuMcSd21Gp9tfcYY5EH/laWWHW4i1pg+ za087/JvYy9qgkZ5GaIQMB/lx/U0h4n7vKHOhhJmrkt8qJ8QHUXUxKBpi6Gu5wj0XQIL TH1okYLuH6DlijoAvU4GcMxmTi5BtI7D80sJ1vwdY+CRzLewgEfOUFfYnSQQUmaHHDue mvYU3s898eJCCWcMTizt5kwcKPOLH1qAYsIFnFd9iDCCSqr/00I7mwBraAOxCQWQCCf/ EhGtYrowKYdY0zJSFQiJ/YJceY0ZDsO+OJkQPIo/CeL/C1MZmxqbDkKtyh6AYR+MrHmV ou8Q== X-Gm-Message-State: AOAM531dNnw7M58VVa0xfxKEp/HJgKQnC3SDckAoucbwCTpHgQUKRSzp U8vu2mWirKns0UoKxJxBGhN5/OC38gnsu/jh5JvGbQ== X-Google-Smtp-Source: ABdhPJxMa8QlbqFVlyqY8hHnMQk9ocnkufGFrjkph7CyO1dQzyOGO3Wvrfuhmg+RWEuWS6Q7zIqJ4mhoHMxQkSMikXM= X-Received: by 2002:a05:6122:2ad:: with SMTP id 13mr20756635vkq.11.1619557179939; Tue, 27 Apr 2021 13:59:39 -0700 (PDT) MIME-Version: 1.0 References: <20210420220804.486803-1-axelrasmussen@google.com> <20210420220804.486803-4-axelrasmussen@google.com> <20210427155414.GB6820@xz-x1> <20210427180314.GD6820@xz-x1> <20210427204250.GG6820@xz-x1> In-Reply-To: <20210427204250.GG6820@xz-x1> From: Hugh Dickins Date: Tue, 27 Apr 2021 13:59:12 -0700 Message-ID: Subject: Re: [PATCH v4 03/10] userfaultfd/shmem: support UFFDIO_CONTINUE for shmem To: Peter Xu Cc: Axel Rasmussen , Alexander Viro , Andrea Arcangeli , Andrew Morton , Jerome Glisse , Joe Perches , Lokesh Gidra , Mike Kravetz , Mike Rapoport , Shaohua Li , Shuah Khan , Stephen Rothwell , Wang Qing , Linux API , Linux-FSDevel , LKML , linux-kselftest@vger.kernel.org, Linux MM , Brian Geffon , "Dr . David Alan Gilbert" , Mina Almasry , Oliver Upton Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: A6C3680192FB X-Stat-Signature: mo8cnmw8kcugcipy9p3weck1u86zekri X-Rspamd-Server: rspam02 Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf08; identity=mailfrom; envelope-from=""; helo=mail-vk1-f181.google.com; client-ip=209.85.221.181 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619557158-216096 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Apr 27, 2021 at 1:42 PM Peter Xu wrote: > On Tue, Apr 27, 2021 at 01:29:14PM -0700, Axel Rasmussen wrote: > > On Tue, Apr 27, 2021 at 11:03 AM Peter Xu wrote: > > > > > > On Tue, Apr 27, 2021 at 09:57:16AM -0700, Axel Rasmussen wrote: > > > > I'd prefer to keep them separate, as they are not tiny patches (they > > > > are roughly +200/-150 each). And, they really are quite independent - > > > > at least in the sense that I can reorder them via rebase with no > > > > conflicts, and the code builds at each commit in either orientation. I > > > > think this implies they're easier to review separately, rather than > > > > squashed. > > > > > > > > I don't have a strong feeling about the order. I slightly prefer > > > > swapping them compared to this v4 series: first introduce minor > > > > faults, then introduce CONTINUE. > > > > > > > > Since Peter also has no strong opinion, and Hugh it sounds like you > > > > prefer it the other way around, I'll swap them as we had in some > > > > previous version of this series: first introduce minor faults, then > > > > introduce CONTINUE. > > > > > > Yes I have no strong opinion, but that's probably the least I prefer. :-) > > > > > > Because you'll declare UFFD_FEATURE_MINOR_SHMEM and enable this feature without > > > the feature being completely implemented (without UFFDIO_CONTINUE, it's not > > > complete since no one will be able to resolve that minor fault). > > > > > > Not a big deal anyway, but since we're at it... Basically I think three things > > > to do for minor shmem support: > > > > > > (1) UFFDIO_CONTINUE (resolving path) > > > (2) Handle fault path for shmem minor fault (faulting path) > > > (3) Enablement of UFFD_FEATURE_MINOR_SHMEM (from which point, user can detect > > > and enable it) > > > > > > I have no preference on how you'd like to merge these steps (right now you did > > > 1 first, then 2+3 later; or as Hugh suggested do 1+2+3 together), but I'd still > > > hope item 3 should always be the last, if possible... > > > > In that case, I'll split the patch which adds the faulting path in > > two: add the faulting path hook and registration mode, and then in a > > separate commit advertise the feature flag as available. > > > > Then I'll order them like so, which I think is the order Hugh finds > > more natural: > > 1. MInor fault registration / faulting path > > 2. CONTINUE ioctl to resolve the faults > > 3. Advertise the feature as supported > > > > Sound okay? > > Good to me, thanks Axel. Okay.