From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751059AbdBAAk1 (ORCPT ); Tue, 31 Jan 2017 19:40:27 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39354 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750885AbdBAAk0 (ORCPT ); Tue, 31 Jan 2017 19:40:26 -0500 Date: Tue, 31 Jan 2017 16:39:28 -0800 From: Andrew Morton To: Mike Rapoport Cc: Andrea Arcangeli , "Dr. David Alan Gilbert" , Hillf Danton , Mike Kravetz , Pavel Emelyanov , Linux-MM , LKML Subject: Re: [PATCH v2 2/5] userfaultfd: non-cooperative: add event for memory unmaps Message-Id: <20170131163928.4e4e05fbd93358d9b937d79b@linux-foundation.org> In-Reply-To: <1485542673-24387-3-git-send-email-rppt@linux.vnet.ibm.com> References: <1485542673-24387-1-git-send-email-rppt@linux.vnet.ibm.com> <1485542673-24387-3-git-send-email-rppt@linux.vnet.ibm.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 27 Jan 2017 20:44:30 +0200 Mike Rapoport wrote: > When a non-cooperative userfaultfd monitor copies pages in the background, > it may encounter regions that were already unmapped. Addition of > UFFD_EVENT_UNMAP allows the uffd monitor to track precisely changes in the > virtual memory layout. > > Since there might be different uffd contexts for the affected VMAs, we > first should create a temporary representation for the unmap event for each > uffd context and then notify them one by one to the appropriate userfault > file descriptors. > > The event notification occurs after the mmap_sem has been released. I was going to bug you about not updating Documentation/vm/userfaultfd.txt but the UFFD_FEATURE flags aren't documented?