Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1443643pxb; Thu, 4 Feb 2021 13:09:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwtMcOMMZG6VFBsGkIOKX3Ro0cim2bHFqcX+NwmXGWG//jpwAxPlD15Kp3yclRvTus8xk3W X-Received: by 2002:a50:e442:: with SMTP id e2mr484185edm.235.1612472978092; Thu, 04 Feb 2021 13:09:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612472978; cv=none; d=google.com; s=arc-20160816; b=ssNePuUQ0OJYR2YlF7SXccle4GY8sjUdIbzARU2U4puNA6p35+xR/wWYfmOLZAf+nB IbhyOFzmYZcl5HxYB/l68fYKrN5MLvlHjkqvoGn7gxrC1eJT8dClKJ7H/2SPCbsbBbGj bHaCYyyqeIIB0bFcb9kK3G4dxnK4vVDJohq/wxtONRJRqUV6X20OJm46njxh3Z5cSZQv unbCO0oWCuHON3260ywTEeCN4etI+r7g+r0vcU930R1WVsR2rtGScZv9dV3+6ajl1QFg 2KRnjb8+kfkAIvTU79X6tr1wYiF/F7POVPpBBUSIehvW3Mfcm8xpPXzLNlCwQqcScCmj Imyg== 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=HV+XckACfIcg3AK8XMs4swxtJ4AOxuPntHPHEvQgCec=; b=UuI0rzhpHm2TfvNhDUi5x/Ty9K0hiKpp2TG8cCMrqCBwYGZMEH3+eAZ1u82iZDj/Gf spUYs1cxIX9j3DxRnst3IG2lUrssSWK/5rQWsEg3Y9MMyJtCe1F6nMZIieUHX/7hp5kI J+GUXj+ev+IqlyzJcdUhb1ldbmRBbSc1/IxowJ8mhAqiXOeN8l5Uki6fF32J6Hg8p/mn DDp+ROYLVTty/0t8snDG6faZUGx7ozby1lKnsj6m0p2VNJqGov675ANdgjqutMcofLCt 9M/mHSHtgabhUlQ+RyXJWi0Pg8GI3fm54eKRrsRmtiyxx1NExClwYpk7m4TgJU51lCd3 dLjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=MRyhbRM6; 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 re16si3663117ejb.93.2021.02.04.13.09.11; Thu, 04 Feb 2021 13:09:38 -0800 (PST) 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=MRyhbRM6; 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 S229748AbhBDVFf (ORCPT + 99 others); Thu, 4 Feb 2021 16:05:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbhBDVFe (ORCPT ); Thu, 4 Feb 2021 16:05:34 -0500 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 F11F1C0613D6 for ; Thu, 4 Feb 2021 13:04:53 -0800 (PST) Received: by mail-io1-xd2f.google.com with SMTP id s24so4784868iob.6 for ; Thu, 04 Feb 2021 13:04:53 -0800 (PST) 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=HV+XckACfIcg3AK8XMs4swxtJ4AOxuPntHPHEvQgCec=; b=MRyhbRM6BU3AS77iFkkM43ylujCLaUJw7P7Il4VpjWeXXFUAJlm1LlFOu+t8CIGDGW G9P+eZSb5AI5yesfmEtwXRkw37EX0TKqEnzJzyl2LG9UvqGyZoNwvpnxSp6RgfPJIVbu BGA696hiUIDHMfVSW3eFB492IUilDk41lwBCoLUbvUSIqE4DTHfNXcw08SpRGHebvpA3 hNXNMw58fLGXk9SoWkurBKIWsIHHlH5A+jJvarPl2NmG10IdcZzdc9//uDeAFeI8cTAb 3O8cSpz0J33qqvSd9tUBVkygCavLLArgZpSaX0gBSdzsuTBHrHLdUogRqAuDrq/msYN/ PNMQ== 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=HV+XckACfIcg3AK8XMs4swxtJ4AOxuPntHPHEvQgCec=; b=La1nxBHD1Y0USAgcTJ12E77VLJqWLIGrU2ZdORcn7NaoCATGBc8+BhoeXIZI422gzy R+rHTBN+9Jyf4LpsPCtQajbKkyxjodc2PGD0tCfAhpJ84jBXS10i9jHQkONNTntYSq4B EhiVRAvcj54Wk13U6f9lmz0OjDCDj+5Tl+5AP4orZpOzf9gaBCDMWKYV7TaMdYNyXFow TkY0R+r6x97AkjX2GXI927PA5VE/RifG9yIV9/hUC56VBtFjsqNDHH6MTdv5sysL8eE2 9FZe6pdssWkL5FaiQ76x8mDy0mEfO0PAGbGxHjTcbE7hbbsDv2MV3dZPHcoMmq4wn8Mq lO2g== X-Gm-Message-State: AOAM530e4fsMPqQtbbNtqsB+qtrTFwMamR/2aCdMz92GUug128uomYqz FUukrOsPbsi2Y9C5BZlD/zwa4lesCbX6pzrp11JQEw== X-Received: by 2002:a05:6638:164f:: with SMTP id a15mr1446296jat.75.1612472693282; Thu, 04 Feb 2021 13:04:53 -0800 (PST) MIME-Version: 1.0 References: <20210204183433.1431202-1-axelrasmussen@google.com> <20210204183433.1431202-10-axelrasmussen@google.com> In-Reply-To: From: Axel Rasmussen Date: Thu, 4 Feb 2021 13:04:16 -0800 Message-ID: Subject: Re: [PATCH v4 09/10] userfaultfd: update documentation to describe minor fault handling To: Randy Dunlap Cc: Alexander Viro , Alexey Dobriyan , Andrea Arcangeli , Andrew Morton , Anshuman Khandual , Catalin Marinas , Chinwen Chang , Huang Ying , Ingo Molnar , Jann Horn , Jerome Glisse , Lokesh Gidra , "Matthew Wilcox (Oracle)" , Michael Ellerman , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Michel Lespinasse , Mike Kravetz , Mike Rapoport , Nicholas Piggin , Peter Xu , Shaohua Li , Shawn Anastasio , Steven Rostedt , Steven Price , Vlastimil Babka , LKML , linux-fsdevel@vger.kernel.org, Linux MM , Adam Ruprecht , Cannon Matthews , "Dr . David Alan Gilbert" , David Rientjes , Mina Almasry , Oliver Upton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 4, 2021 at 11:57 AM Randy Dunlap wrote: > > Hi Axel- > > one typo found: > > On 2/4/21 10:34 AM, Axel Rasmussen wrote: > > Reword / reorganize things a little bit into "lists", so new features / > > modes / ioctls can sort of just be appended. > > Good plan. > > > > > Signed-off-by: Axel Rasmussen > > --- > > Documentation/admin-guide/mm/userfaultfd.rst | 107 ++++++++++++------- > > 1 file changed, 66 insertions(+), 41 deletions(-) > > > > diff --git a/Documentation/admin-guide/mm/userfaultfd.rst b/Documentation/admin-guide/mm/userfaultfd.rst > > index 65eefa66c0ba..cfd3daf59d0e 100644 > > --- a/Documentation/admin-guide/mm/userfaultfd.rst > > +++ b/Documentation/admin-guide/mm/userfaultfd.rst > > [snip] > > > - > > -Once the ``userfaultfd`` has been enabled the ``UFFDIO_REGISTER`` ioctl should > > -be invoked (if present in the returned ``uffdio_api.ioctls`` bitmask) to > > -register a memory range in the ``userfaultfd`` by setting the > > +events, except page fault notifications, may be generated: > > + > > +- The ``UFFD_FEATURE_EVENT_*`` flags indicate that various other events > > + other than page faults are supported. These events are described in more > > + detail below in the `Non-cooperative userfaultfd`_ section. > > + > > +- ``UFFD_FEATURE_MISSING_HUGETLBFS`` and ``UFFD_FEATURE_MISSING_SHMEM`` > > + indicate that the kernel supports ``UFFDIO_REGISTER_MODE_MISSING`` > > + registrations for hugetlbfs and shared memory (covering all shmem APIs, > > + i.e. tmpfs, ``IPCSHM``, ``/dev/zero``, ``MAP_SHARED``, ``memfd_create``, > > + etc) virtual memory areas, respectively. > > + > > +- ``UFFD_FEATURE_MINOR_HUGETLBFS`` indicates that the kernel supports > > + ``UFFDIO_REGISTER_MODE_MINOR`` registration for hugetlbfs virtual memory > > + areas. > > + > > +The userland application should set the feature flags it intends to use > > (ah, userspace has moved to userland temporarily. :) For better or worse, other parts of the document I'm not touching also use this wording. Maybe we should s/userland/userspace/g, but perhaps better done as a separate commit to keep this diff focused? Anecdotally, the use of "userland" doesn't seem to be completely unprecedented (e.g. grep -r "userland" | wc -l yields 566 matches in the kernel tree). I don't have strong feelings, and I was amused by picturing some Shire-esque countryside with a friendly sign that reads: ~userland welcomes you~. :) > > > +when envoking the ``UFFDIO_API`` ioctl, to request that those features be > > invoking Whoops! Will send a new version with this fix. Thanks! > > > +enabled if supported. > > > thanks. > -- > ~Randy >