Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754932AbdDMRFB (ORCPT ); Thu, 13 Apr 2017 13:05:01 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:43287 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753137AbdDMRE6 (ORCPT ); Thu, 13 Apr 2017 13:04:58 -0400 X-IronPort-AV: E=Sophos;i="5.37,195,1488841200"; d="scan'208";a="220357307" Date: Thu, 13 Apr 2017 19:04:56 +0200 From: Samuel Thibault To: Matthew Wilcox Cc: 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: <20170413170456.77abmvqs6b6b3hfx@var.youpi.perso.aquilenet.fr> Mail-Followup-To: Samuel Thibault , Matthew Wilcox , Greg Kroah-Hartman , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20160229162835.GA2816@var.bordeaux.inria.fr> <20170413094200.b4lftvumqt4g36hz@var.youpi.perso.aquilenet.fr> <20170413162946.jxyzfdggia2gge76@var.youpi.perso.aquilenet.fr> <20170413163411.GH784@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170413163411.GH784@bombadil.infradead.org> Organization: I am not organized User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 847 Lines: 21 Matthew Wilcox, on jeu. 13 avril 2017 09:34:11 -0700, wrote: > 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. Yes it is a concern. I was a bit afraid that implementing map_pages would be frowned upon, and getting in first a simple yet already useful /dev/garbage would work better :) I'm fine with doing either. > I think the eventual intent is that map_pages would be able to > populate a PMD or even a PUD. Yes. Allocating such a big page can be a problem, though. Samuel