From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx144.postini.com [74.125.245.144]) by kanga.kvack.org (Postfix) with SMTP id E18B46B0044 for ; Mon, 5 Nov 2012 21:07:12 -0500 (EST) Message-ID: <50987004.1000003@fb.com> Date: Mon, 5 Nov 2012 18:03:48 -0800 From: Arun Sharma MIME-Version: 1.0 Subject: Re: [RFC v2] Support volatile range for anon vma References: <1351560594-18366-1-git-send-email-minchan@kernel.org> <20121031143524.0509665d.akpm@linux-foundation.org> <20121105235443.GA27718@dev3310.snc6.facebook.com> <20121106014932.GA4623@barrios> In-Reply-To: <20121106014932.GA4623@barrios> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Minchan Kim Cc: KOSAKI Motohiro , Paul Turner , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, John Stultz , Christoph Lameter , Android Kernel Team , Robert Love , Mel Gorman , Hugh Dickins , Dave Hansen , Rik van Riel , Dave Chinner , Neil Brown , Mike Hommey , Taras Glek , KAMEZAWA Hiroyuki , sanjay@google.com, David Rientjes On 11/5/12 5:49 PM, Minchan Kim wrote: >> Also, memory allocators have a second motivation in using madvise: to >> create virtually contiguous regions of memory from a fragmented address >> space, without increasing the RSS. > > I don't get it. How do we create contiguos region by madvise? > Just out of curiosity. > Could you elaborate that use case? :) By using a new anonymous map and faulting pages in. The fragmented virtual memory is released via MADV_DONTNEED and if the malloc/free activity on the system is dominated by one process, chances are that the newly faulted in page is the one released by the same process :) The net effect is that physical pages within a single address space are rearranged so larger allocations can be satisfied. -Arun -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org