Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753360AbdDMQeQ (ORCPT ); Thu, 13 Apr 2017 12:34:16 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:40629 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752539AbdDMQeP (ORCPT ); Thu, 13 Apr 2017 12:34:15 -0400 Date: Thu, 13 Apr 2017 09:34:11 -0700 From: Matthew Wilcox To: Samuel Thibault , Greg Kroah-Hartman , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC] Re: Costless huge virtual memory? /dev/same, /dev/null? Message-ID: <20170413163411.GH784@bombadil.infradead.org> References: <20160229162835.GA2816@var.bordeaux.inria.fr> <20170413094200.b4lftvumqt4g36hz@var.youpi.perso.aquilenet.fr> <20170413162946.jxyzfdggia2gge76@var.youpi.perso.aquilenet.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170413162946.jxyzfdggia2gge76@var.youpi.perso.aquilenet.fr> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 495 Lines: 8 On Thu, Apr 13, 2017 at 06:29:46PM +0200, Samuel Thibault wrote: > (Ideally we'd be able to take the MAP_HUGETLB mmap flag into account to > map a single huge page repeatedly, even lowering the populating cost, > but AIUI of the current hugepage support it would be far from easy) You could implement ->map_pages instead of (or as well as) ->fault, which would lower your costs if that is a concern. I think the eventual intent is that map_pages would be able to populate a PMD or even a PUD.