Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933635Ab2KFCif (ORCPT ); Mon, 5 Nov 2012 21:38:35 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:49390 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933560Ab2KFCie (ORCPT ); Mon, 5 Nov 2012 21:38:34 -0500 X-Greylist: delayed 1869 seconds by postgrey-1.27 at vger.kernel.org; Mon, 05 Nov 2012 21:38:34 EST Message-ID: <50987004.1000003@fb.com> Date: Mon, 5 Nov 2012 18:03:48 -0800 From: Arun Sharma User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Minchan Kim CC: KOSAKI Motohiro , Paul Turner , Andrew Morton , , , 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 , , David Rientjes 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 X-Originating-IP: [192.168.18.254] X-Proofpoint-Spam-Reason: safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855,1.0.431,0.0.0000 definitions=2012-11-05_06:2012-11-05,2012-11-05,1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1014 Lines: 26 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 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/