From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbSfV-0001HJ-Bl for qemu-devel@nongnu.org; Tue, 07 Oct 2014 07:11:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbSfP-0003ii-G8 for qemu-devel@nongnu.org; Tue, 07 Oct 2014 07:11:01 -0400 Received: from mta-out1.inet.fi ([62.71.2.226]:46101 helo=kirsi1.inet.fi) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbSfP-0003iT-6b for qemu-devel@nongnu.org; Tue, 07 Oct 2014 07:10:55 -0400 Date: Tue, 7 Oct 2014 14:10:26 +0300 From: "Kirill A. Shutemov" Message-ID: <20141007111026.GD30762@node.dhcp.inet.fi> References: <1412356087-16115-1-git-send-email-aarcange@redhat.com> <1412356087-16115-11-git-send-email-aarcange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1412356087-16115-11-git-send-email-aarcange@redhat.com> Subject: Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrea Arcangeli Cc: Robert Love , Dave Hansen , Jan Kara , kvm@vger.kernel.org, Neil Brown , Stefan Hajnoczi , qemu-devel@nongnu.org, linux-mm@kvack.org, KOSAKI Motohiro , Michel Lespinasse , Taras Glek , Juan Quintela , Hugh Dickins , Isaku Yamahata , Mel Gorman , Sasha Levin , Android Kernel Team , Andrew Jones , "Huangpeng (Peter)" , "\\\"Dr. David Alan Gilbert\\\"" , Andres Lagar-Cavilla , Christopher Covington , Anthony Liguori , Mike Hommey , Keith Packard , Wenchao Xia , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski , Minchan Kim , Dmitry Adamushko , Johannes Weiner , Paolo Bonzini , Andrew Morton , Linus Torvalds , Peter Feiner On Fri, Oct 03, 2014 at 07:08:00PM +0200, Andrea Arcangeli wrote: > There's one constraint enforced to allow this simplification: the > source pages passed to remap_anon_pages must be mapped only in one > vma, but this is not a limitation when used to handle userland page > faults with MADV_USERFAULT. The source addresses passed to > remap_anon_pages should be set as VM_DONTCOPY with MADV_DONTFORK to > avoid any risk of the mapcount of the pages increasing, if fork runs > in parallel in another thread, before or while remap_anon_pages runs. Have you considered triggering COW instead of adding limitation on pages' mapcount? The limitation looks artificial from interface POV. -- Kirill A. Shutemov