From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757682Ab2GFSlZ (ORCPT ); Fri, 6 Jul 2012 14:41:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45791 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756051Ab2GFSlX (ORCPT ); Fri, 6 Jul 2012 14:41:23 -0400 Message-ID: <4FF73106.3090802@redhat.com> Date: Fri, 06 Jul 2012 14:40:06 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Peter Zijlstra CC: Linus Torvalds , Andrew Morton , Thomas Gleixner , Ingo Molnar , Paul Turner , Suresh Siddha , Mike Galbraith , "Paul E. McKenney" , Lai Jiangshan , Dan Smith , Bharata B Rao , Lee Schermerhorn , Andrea Arcangeli , Johannes Weiner , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC][PATCH 04/26] mm, mpol: add MPOL_MF_NOOP References: <20120316144028.036474157@chello.nl> <20120316144240.368911012@chello.nl> In-Reply-To: <20120316144240.368911012@chello.nl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/16/2012 10:40 AM, Peter Zijlstra wrote: Reasonable idea, but we need something else than a blind unmap and add to swap space, which requires people to run with gigantic amounts of swap space they will likely never use. I suspect that Andrea's _PAGE_NUMA stuff could be implemented using _PAGE_PROTNONE, and then we can simply call the NUMA faulting/migration handler whenever we run into a _PAGE_PROTNONE page in handle_mm_fault / handle_pte_fault. This overloading of _PAGE_PROTNONE should work fine, because do_page_fault will never call handle_mm_fault if the fault is happening on a PROT_NONE VMA. Only if we have the correct VMA permission will handle_mm_fault be called, at which point we can fix the pte (and maybe migrate the page). The same trick can be done at the pmd level for transparent hugepages, allowing the entire THP to be migrated in one shot, with just one fault. Is there any reason why _PAGE_PROTNONE could not work instead of _PAGE_NUMA or the swap cache thing? -- All rights reversed