From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="iso-8859-1" From: Daniel Phillips Subject: Re: [PATCH] (1/2) reverse mapping VM for 2.5.23 (rmap-13b) Date: Thu, 4 Jul 2002 07:19:50 +0200 References: <6660000.1024954471@flay> In-Reply-To: <6660000.1024954471@flay> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: Sender: owner-linux-mm@kvack.org Return-Path: To: "Martin J. Bligh" , Linus Torvalds , Craig Kulesa Cc: Ingo Molnar , Rik van Riel , Dave Jones , Daniel Phillips , linux-kernel@vger.kernel.org, linux-mm@kvack.org, rwhron@earthlink.net List-ID: On Monday 24 June 2002 23:34, Martin J. Bligh wrote: > ... as far as I can see, rmap triples the > memory requirement of PTEs through the PTE chain's doubly linked list > (an additional 8 bytes per entry) It's 8 bytes per pte_chain node all right, but it's a single linked list, with each pte_chain node pointing at a pte and the next pte_chain node. > ... perhaps my calculations are wrong? Yep. You do not get one pte_chain node per pte, it's one per mapped page, plus one for each additional sharer of the page. With the direct pointer optimization, where an unshared struct page points directly at the pte (rumor has it Dave McCracken has done the patch) then the pte_chain overhead goes away for all except shared pages. Then with page table sharing, again the direct pointer optimization is possible. So the pte_chain overhead drops rapidly, and in any case, is not proportional to the number of ptes. For practical purposes, the memory overhead for rmap boils down to one extra field in struct page, that is, it's proportional to the number of physical pages, an overhead of less than .1%. In heavy sharing situations the pte_chain overhead will rise somewhat, but this is precisely the type of load where reverse mapping is most needed for efficient and predictable pageout processing, and page table sharing should help here as well. -- Daniel -- 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/