Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4830385pxy; Tue, 27 Apr 2021 13:44:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3nrUpZC8Cs/pUSgUAg8PqB9+JBlLht6iUJbLmjZyoQRUQoMntoUoBJbj3skzUVEFaedBi X-Received: by 2002:a17:90b:19ca:: with SMTP id nm10mr29612106pjb.175.1619556246232; Tue, 27 Apr 2021 13:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619556246; cv=none; d=google.com; s=arc-20160816; b=NMN0b6cz1rB0hMYjvNcubpE5fE6QFAUsOlofkYOv96kZynXF+MqOYPX4o6w1VBsfXI L+uKToyDTqvyS0vPA8RsHWCsfja0q5NWGr4IojJAJPWrEeJjhmGnmRvMjNvTguMoAVud 29rEtnCyzS00sZ/lfP+2700rLGHBC32tQTccsPs5hqziF8WIe65C6YcTlJfS08/Xu9Hc m7zgv++x3gmJNF3W1GeplqNgTFlMFv7ERqvHdGHDDguDBbmUHEkwmhduegqgocLlrzzI 6JZ2V0XthiBZSXIy6het+CQaHSgHzC0DLRPxEpg1v1hRnc8kELvutFHGoPUANSnt0Ay6 bf8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/RvrYyTMEiHtCZW0MwDUjdnqhLrqE4kTWBWaQVaWhX4=; b=KPjFH1KAvLJP2w8tMZaZnp/2pu+RD6/ToK+F29CjOR3L2N8sweIXLmF3VetXy2LZQq flb0wVGJDbvyRbISQnywwEAheiOUhvghnXjbNz60wIPMujRu9iSoIf+/8rNdmEWBDcdC bSjxm6r/HOutFxh2TB+Rygp268KWh/QTGOaXxDlLBJ//2himMMzw0ClTD+whH98kUbtE eEKrwptBK6UOX91fBGSz1LI5jWgaH6IJaoAJtsNAm39TA8dbysu6Mw6EVxoZs0N6PCgj CvuIJX1jhc5oNKQBVoWq3DBkl1RbJNyWSrcGYBa7KPYzoHkjzkYfvM+LlU8MoPeQDE0v 8yNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=R+8E57gn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si795665pgj.515.2021.04.27.13.43.53; Tue, 27 Apr 2021 13:44:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=R+8E57gn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237015AbhD0Unm (ORCPT + 99 others); Tue, 27 Apr 2021 16:43:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50849 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236993AbhD0Unl (ORCPT ); Tue, 27 Apr 2021 16:43:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619556177; 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: in-reply-to:in-reply-to:references:references; bh=/RvrYyTMEiHtCZW0MwDUjdnqhLrqE4kTWBWaQVaWhX4=; b=R+8E57gn+B5pgn/NxvlCNBsLbYiPuVc5cch5zvyqtSod1/N6mzM5Z3rQFumyylhiY4OEfl oteEHckGYAV8w/VvHMRE2m96Fpox5QftSI+Fa5zohXmfwErXAkyMlKaeFluZ2IVBsm7+od BlUGHZBK51b/8ahGRkrEM0V+eAWhFF0= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-64-NrHpABDHO2i9CoqGT-aphg-1; Tue, 27 Apr 2021 16:42:53 -0400 X-MC-Unique: NrHpABDHO2i9CoqGT-aphg-1 Received: by mail-qt1-f197.google.com with SMTP id z5-20020a05622a0285b02901b943be06b5so15992274qtw.17 for ; Tue, 27 Apr 2021 13:42:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/RvrYyTMEiHtCZW0MwDUjdnqhLrqE4kTWBWaQVaWhX4=; b=mOZUCyJ6PXCi5d2ocKDAM+2JmJ8ui8skztJqCiiAbadQBx4uQnm9oYNR/uHFsfkIbX gIXzYQ6vWa9iZgGiB5ESL+qVcViF1xrV5ZdbIXr6+xjQBmuPC5xoQHYq0DR4VQX1bEs7 CU7ZWnuNEknWdS4lsmUM4l9MeCwFDTBxebUO3YNwieQEav8fDFMEXKrPYhd3VJ4LYbNc rwHg8YmuogzUmHfTMBCYn5PemSLQHlsOpNYfgkiBaqlmIs3ebeRqNq68do9cHDJg6ELW dMewV8MNuykVw+ykT6pIOq9zk+x9MqPK1osLoQmL3D+GA+lsbev8EMD/eU2fAegFUPKN Avsw== X-Gm-Message-State: AOAM533+bOn6D9O4PJe1ffUC+hOG9dCHu85tOecemdSe3XSnMdb7fCi0 THXXhmYhRrhe/aeG11WNurYR43DCBm0zHHv5RySCFhgSffraX41diN7hPTv8NDLm4UKIMx82TJ7 HH5ELQ20UwAiD8zOEvPKEPG0t X-Received: by 2002:a05:622a:11d1:: with SMTP id n17mr10557594qtk.360.1619556172933; Tue, 27 Apr 2021 13:42:52 -0700 (PDT) X-Received: by 2002:a05:622a:11d1:: with SMTP id n17mr10557577qtk.360.1619556172652; Tue, 27 Apr 2021 13:42:52 -0700 (PDT) Received: from xz-x1 (bras-base-toroon474qw-grc-77-184-145-104-227.dsl.bell.ca. [184.145.104.227]) by smtp.gmail.com with ESMTPSA id u126sm3664993qkd.80.2021.04.27.13.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 13:42:51 -0700 (PDT) Date: Tue, 27 Apr 2021 16:42:50 -0400 From: Peter Xu To: Axel Rasmussen Cc: Hugh Dickins , 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@vger.kernel.org, linux-fsdevel@vger.kernel.org, LKML , linux-kselftest@vger.kernel.org, Linux MM , Brian Geffon , "Dr . David Alan Gilbert" , Mina Almasry , Oliver Upton Subject: Re: [PATCH v4 03/10] userfaultfd/shmem: support UFFDIO_CONTINUE for shmem Message-ID: <20210427204250.GG6820@xz-x1> References: <20210420220804.486803-1-axelrasmussen@google.com> <20210420220804.486803-4-axelrasmussen@google.com> <20210427155414.GB6820@xz-x1> <20210427180314.GD6820@xz-x1> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Peter Xu