Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4822981pxy; Tue, 27 Apr 2021 13:32:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOqSl8La3o2ejf/dWvUi/++1j5EFY57Qh/0rBAhDwF7X6AJFXrfSi7vyIXTgFKjMEX4A1O X-Received: by 2002:a17:906:a20b:: with SMTP id r11mr25499966ejy.323.1619555542981; Tue, 27 Apr 2021 13:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619555542; cv=none; d=google.com; s=arc-20160816; b=YM0KRMb3fumkqGEbPZ1ToteuoAaJurfHJHqZ5kaG0QTAmDDfIseLTVcFBXwT/JhjDd FkkbDOgDVVSqZ5/SFpvv1ON1kTniDRkgWkO1OSQMdCjRVf/JDGp0nl7Srf9YaOnd6W5/ WIxTj7hUzmKBhqLJG/RvZk0uU7/LZsr2XmRejWK9lR5lwkOPQNhuo4Gr0J5X5prnPzfe A6x4enmI8cyQzidq3ZIhGU+OIm4IJQsRC5PyRs0bXbIyEXywLBLrgLr14tYF9MhpHPzH 8nCDEDIGJlzkN6dTtvuyX0glVCvp0srAv3AAe0DVZi8ttm5AsxThpyKSWvNSNf3kyLwv nqaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=WzJWSS3LQ6tF0DgK++1lrPiC81dYzxiPck8oPTQIuQM=; b=gR2gX+bvCan/AyL8gburtoDcYWV2pTnf3I5XLwbysvmqP2C7Hh3rlz2A5YguK9bU7h WQNW9HP6eKLFIRDkAc09OxasyXTZUonO33bPCBllwGXtGFUCA3JVw5j8gCkUfN8i+r1O D7iv4GhMh0swHtNQTO3GPZG5Wm6phzspIPCtoBBCKeczC3GGt3e9kmq/cjajIaWnb8U8 zk47ma2FI1ullgpn/Bs7DqUb0jfnXA2ejYBvhpvCbRhM971j7+WRFZTmHAI9a4pVAiSf LFMWfi7119hj/WkAcCDD9PN5iGufC+Vs3jxmlaZWhc3tiRisb6zaMPF2uUVLya39VRpf GhzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gbNFD7Fo; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q7si776570ejs.275.2021.04.27.13.31.25; Tue, 27 Apr 2021 13:32:22 -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=@google.com header.s=20161025 header.b=gbNFD7Fo; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237044AbhD0Uag (ORCPT + 99 others); Tue, 27 Apr 2021 16:30:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235610AbhD0Uag (ORCPT ); Tue, 27 Apr 2021 16:30:36 -0400 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61300C061760 for ; Tue, 27 Apr 2021 13:29:52 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id z14so8393306ioc.12 for ; Tue, 27 Apr 2021 13:29:52 -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=WzJWSS3LQ6tF0DgK++1lrPiC81dYzxiPck8oPTQIuQM=; b=gbNFD7FoTA7n8IPPyw2KHOylIt8tzudj0Lpkdgu7mzsab/vYDoCX8VQ2+pW2PafQbp JxR1XGRxzePWZg0k/lL8HrzfJX1SnDe5TpFzpooVXmvhCVtquqkAHffLdiPX/s4G6iTl 9ONp86hzSzE7P1p3W+LL5QOZ/CQ3Ze/kT8jGK0OwsPFtA9fF3Z8j93LJX1jAzWtovcFo wraUFwADLhrGc/ZRhKyMAE1vzcpZTFlKnS3wTfzLUX/OyuUTfXrJrtKvBZoyZWbDyJDM IGj8vWkjpL1dSCRy2ZHIBkB+wFNwbbCdZZCFIG8416YkWzweIhGhpxBxMpCiUWXMipAc 5UdQ== 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=WzJWSS3LQ6tF0DgK++1lrPiC81dYzxiPck8oPTQIuQM=; b=jpZLJQwwb5yy5rfA0BXltRDWf8hVRs5GO7kucQM/Le8fZXCVyZ4U9nVxAWgurPYilN j3O80YNSzOJUnBD2C/v8nm05wUeIIMnTffkhfktlTJmAOPSHcLgwjITFm370zbqSvZOC UTyCYoWZOQiu50ygyXRto/zlo7fWAKwM/AQgmVyodtWwB3qw25VMmQRo+Muh8xmBuDAX gR+jrhNvR1ec4h0Ak4vJEkdu7Q0V2Dpv5nyqTaswfBEaIXgL6eHFUqIawJbC8AmaxTGW 9WFha3Wx9Za2MpcB7i/0Z0U1vo0XQKxexC3+4ShPC6/+j26H/WN3/pYxM7qA31P5HytG n9Dg== X-Gm-Message-State: AOAM530lU/vWLSF4CMGlJVpkcChx9tKBLZu3giRrH6sU5lZdiEnxTI0C //7TyJRf4AoDTKB1p9zznmdgPVaIcNDG4Miotysz9g== X-Received: by 2002:a05:6638:3387:: with SMTP id h7mr12471126jav.96.1619555391579; Tue, 27 Apr 2021 13:29:51 -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> In-Reply-To: <20210427180314.GD6820@xz-x1> From: Axel Rasmussen Date: Tue, 27 Apr 2021 13:29:14 -0700 Message-ID: Subject: Re: [PATCH v4 03/10] userfaultfd/shmem: support UFFDIO_CONTINUE for shmem To: Peter Xu 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > Thanks, > > -- > Peter Xu >