Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4840886pxy; Tue, 27 Apr 2021 14:01:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+GR4Bo4ufD5AoX/zsGZndorYzeqMUvzVnyeSZRz6rJrKoMA3TigDdct9ZLoZXYLYSjIQc X-Received: by 2002:a63:1a47:: with SMTP id a7mr23636104pgm.437.1619557268515; Tue, 27 Apr 2021 14:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619557268; cv=none; d=google.com; s=arc-20160816; b=vgHD2j0vGT+5BFUIEEYNbIxG62Jji+IxEMM+ejs+dqTTOyLPlZ/Wwp/1XqJd0R+2EQ aw7fg41QQ+PNaRNRXNJAZmS9lCvuB4wDu8nUGpNbPuU6eSeuc+qUzXxuB8YIXhkBPELi kqL0dNaeo35ZWP/xNKGPKWKU8Ktd2vSUVt0KlFtQULBVoKBSDpGI8Qh9A4XOqDP8C4SE gPMcFr9pK+RfS7EqAAznpPjhHhYiZOqtpwoNNhOpkxqwlPgrw0bw7w1ZMbkii2ZBzw19 rARCQ1YT88+T4XDC0BfOy2hyLErUGwlasrSjVNLLYHx9U/hmDis4oHmEW+kDTB6RHGLO Eo0A== 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=0HWA17end2mHSBOn8PRau19glHvfoApvxJN4UI4e4wY=; b=zxhY2Ogt/SVPfbdBgZ7915RmyJGIeKITvLsLa5CziXmz6R1x0r8f8yX3tcCVhvMOis wXE1/LtBNJg+36smUJ5OVR2WA+FBtt6cQDdEwvvDcgkXs2l5l+/UvyuIcj2CIveiuUYt 3WYlxHatEeztPoqjeBNvYESCUTfv6LztYmCMR8LvTb38Ck++j1ZrcbMsGaxMzZeRZkJH xo6wcsbI5PLQX22HJXnmPxGwmoVOzVC7UUaxFm/Vt6gZEFuttMVvBFEVNsiUvSl1YUJL G2lt9Qjnk3n8REKyhOMhymLuqPTdExX1EAhzXBUOcelaIn4oSuQ5GdOkYV94tnZcM/hi RP8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=kNKfv+4q; 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 ot9si4667044pjb.104.2021.04.27.14.00.55; Tue, 27 Apr 2021 14:01:08 -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=kNKfv+4q; 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 S239233AbhD0VA3 (ORCPT + 99 others); Tue, 27 Apr 2021 17:00:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239159AbhD0VA1 (ORCPT ); Tue, 27 Apr 2021 17:00:27 -0400 Received: from mail-vk1-xa33.google.com (mail-vk1-xa33.google.com [IPv6:2607:f8b0:4864:20::a33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02E9DC061761 for ; Tue, 27 Apr 2021 13:59:41 -0700 (PDT) Received: by mail-vk1-xa33.google.com with SMTP id n74so570721vkc.6 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=HGWxa2Te+KfkUWrwZb1KGt2Vht2ilvWEk+h48snhhjb8PNZyTo7ovYqkW4fhlm23x/ Pfsxp+OSbBtU84Gwb1oBMdvEo9Hw2ZF67dfyNdF0xdPXoUIJPP9lmO7RHWcGbtvIeaSc VL3SIOoQ8hie3Pon2QGZVneC/kAurLAsOQkkZ+4QUIThsvkKdJud62XARG9RWukyoGhm szN7CG4iKto12LA3+PTMm0astXi9xN37FUREUMMWzlezSC/JtE9jFK7Jbnx9Iy6aywER SPosm3GN9MnJClIYp/a1OEqFRgXcclur9JmC/mjPU6NWJFtfMd5RAxgA1gsmGq9vuUZs 4P9Q== X-Gm-Message-State: AOAM532zqqO+ksVZNjwDdqFli2l22qwJyYVVxjr9mO9zKyLtWA4uwVQd 28Y7atFV3wBV3ZLVyDhvr8x67cUCfrmy49L436Pv3w== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.