Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751650AbbEGTxW (ORCPT ); Thu, 7 May 2015 15:53:22 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:33461 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751167AbbEGTxT (ORCPT ); Thu, 7 May 2015 15:53:19 -0400 Date: Thu, 7 May 2015 21:53:13 +0200 From: Ingo Molnar To: Jerome Glisse Cc: Dave Hansen , Dan Williams , Linus Torvalds , Linux Kernel Mailing List , Boaz Harrosh , Jan Kara , Mike Snitzer , Neil Brown , Benjamin Herrenschmidt , Heiko Carstens , Chris Mason , Paul Mackerras , "H. Peter Anvin" , Christoph Hellwig , Alasdair Kergon , "linux-nvdimm@lists.01.org" , Mel Gorman , Matthew Wilcox , Ross Zwisler , Rik van Riel , Martin Schwidefsky , Jens Axboe , "Theodore Ts'o" , "Martin K. Petersen" , Julia Lawall , Tejun Heo , linux-fsdevel , Andrew Morton , paulmck@linux.vnet.ibm.com Subject: Re: [PATCH v2 00/10] evacuate struct page from the block layer, introduce __pfn_t Message-ID: <20150507195313.GA23597@gmail.com> References: <20150507173641.GA21781@gmail.com> <554BA748.9030804@linux.intel.com> <20150507191107.GB22952@gmail.com> <20150507193635.GC5966@gmail.com> <20150507194832.GB23511@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150507194832.GB23511@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1428 Lines: 33 * Ingo Molnar wrote: > > Is handling kernel pagefault on the vmemmap completely out of the > > picture ? So we would carveout a chunck of kernel address space > > for those pfn and use it for vmemmap and handle pagefault on it. > > That's pretty clever. The page fault doesn't even have to do remote > TLB shootdown, because it only establishes mappings - so it's pretty > atomic, a bit like the minor vmalloc() area faults we are doing. > > Some sort of LRA (least recently allocated) scheme could unmap the > area in chunks if it's beyond a certain size, to keep a limit on > size. Done from the same context and would use remote TLB shootdown. > > The only limitation I can see is that such faults would have to be > able to sleep, to do the allocation. So pfn_to_page() could not be > used in arbitrary contexts. So another complication would be that we cannot just unmap such pages when we want to recycle them, because the struct page in them might be in use - so all struct page uses would have to refcount the underlying page. We don't really do that today: code just looks up struct pages and assumes they never go away. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/