Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1406905pxb; Thu, 4 Feb 2021 12:06:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4lX8N6iFLJNoyqu81MHdSTv9II3mRgQJX5Bj7qqZ0vGtQsJsi/9avpLTJYpARppocZzMq X-Received: by 2002:a05:6402:28e:: with SMTP id l14mr260693edv.307.1612469171456; Thu, 04 Feb 2021 12:06:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612469171; cv=none; d=google.com; s=arc-20160816; b=Et+vqOi+V3edjm8ww0roQvIuAuq3pf0ByEE19IJH3m1gk9koOkrRx2zu2TRT+KuQAx w/gaq0707NAqN/Vgatiuv26UCjJsm1TdeJdNxxoF9pks0jl1HSkA1ivBcCq5R6BQmR8J P1pIQX69QegaYtTptcfc2wAAbJwXzZkBJzA9dIOabuCscrG9P6jkX/gFFdmUu2QzGCm3 qQ7ElFi3PWLGHsQuIS1Q7QumZHEP+bizTqHhYGeTm+/GeubfyGVsT1g2atKdKNL2ge3X M07yYFVONmrv8FDAL0Xitw8qZjfk7hs3b8N5GCiI6EcpUdg8B93IZRufCUK1YcnbSxrr ppiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=0HxWZfz3W3M/WFGpU2ZZhpTfeSKRLfLuDtTHq7CE0OU=; b=Ug7XeST218wKrhAmeQA+HZNSAzqQhp8+80+V+eFnvA7D8ClL2OUPsnqpm4SuoMDZfK Mr9wAFs17fPUr9Jn4l+4EXAhqdJTeMGvW5iZDGRh2+aUu5pUTqh2PPQd05kKOwsI+Fev KbeDxlykBEcAIWvFjcxXbOQQGnZp5E7CEHfyJcp+vRs/712+4s3Py0cUOzpuHN8Du9PU GtrBOFZgP90xJ0b4W8xJVGub8TnB7MdGwtjN2+5D5F/27vdgfEdmi862aHjMtFcU9TUr NlWlAcoPpycuTLtcsF7FPH38wh797cY61+XhR6ySEyULXeyNDrWWkrQAICkYbpGUBDhm aUSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=ACh73T1w; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u22si3684123ejc.544.2021.02.04.12.05.45; Thu, 04 Feb 2021 12:06:11 -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=@infradead.org header.s=merlin.20170209 header.b=ACh73T1w; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239894AbhBDUB3 (ORCPT + 99 others); Thu, 4 Feb 2021 15:01:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239909AbhBDT6k (ORCPT ); Thu, 4 Feb 2021 14:58:40 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFF8AC06178C; Thu, 4 Feb 2021 11:57:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=0HxWZfz3W3M/WFGpU2ZZhpTfeSKRLfLuDtTHq7CE0OU=; b=ACh73T1wg/Dg0hUSsxqNqCOOWR s8BUucN7GMlUn+fePuaIbJux8JCvFS835ypdDs9E6MR0pStE07I6gHd3sKzPKXZsh6AANZQKf7Epg TIuC3YGOd/wh8KJN6QA6EWDq8QDZrgiILecJDrxAbEN7Xwsr5fAb3DmsK1khx8u6BS2y6/hte/1Jv eqOleqMEg2rwxjnIuVTqpt4s7JrDHgWkcCnbDintkjUmqwIWDsNQsW0D89N6xgaRrC1wjioFpOWZ5 UNUlLnqud2qviYdAQu+e1KXwO0CL1X4a3i8+4RGNZD0O72WUrt1mqyB7TPPAO20lv1jxUlXft0tRm eDJaDcmg==; Received: from [2601:1c0:6280:3f0::aec2] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7klA-0004UU-17; Thu, 04 Feb 2021 19:57:48 +0000 Subject: Re: [PATCH v4 09/10] userfaultfd: update documentation to describe minor fault handling To: Axel Rasmussen , 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 Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Adam Ruprecht , Cannon Matthews , "Dr . David Alan Gilbert" , David Rientjes , Mina Almasry , Oliver Upton References: <20210204183433.1431202-1-axelrasmussen@google.com> <20210204183433.1431202-10-axelrasmussen@google.com> From: Randy Dunlap Message-ID: Date: Thu, 4 Feb 2021 11:57:36 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20210204183433.1431202-10-axelrasmussen@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. :) > +when envoking the ``UFFDIO_API`` ioctl, to request that those features be invoking > +enabled if supported. thanks. -- ~Randy