From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 10 20:00:35 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 81E575EC for ; Wed, 10 Apr 2013 20:00:35 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 701936EE for ; Wed, 10 Apr 2013 20:00:35 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id 4AEB61A3C19; Wed, 10 Apr 2013 13:00:33 -0700 (PDT) Message-ID: <5165C4D7.3050308@mu.org> Date: Wed, 10 Apr 2013 13:00:23 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Benjamin Kaduk Subject: Re: Multiple page size support on FreeBSD? References: <201304101006.13960.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Wojciech Puchar , Sebastian Feld , freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2013 20:00:35 -0000 On 4/10/13 11:42 AM, Benjamin Kaduk wrote: > On Wed, 10 Apr 2013, Wojciech Puchar wrote: > >>> How do your tests work? Do you examine PTEs directly to check for >>> superpages >>> or are you relying on the vm.pmap.pde sysctls? >> >> the later. >> >> anyway - algorithm described on list - that heuristics detects >> consecutive page access doesn't really help the urgent case - RANDOM >> access to large amount of memory. > > The algorithm is not a heuristic based on consecutive accesses, > promotion occurs when the entire superpage's worth of memory has > actually been accessed. If I remember correctly, the performance gain > from superpages was only a few percent, so spending more time trying > to decide when to use them would make the algorithm a net wash. > > You should really watch the talk I linked to if you're interested, it > was quite interesting. > >> sequential access will get minimal improvement. >> >> IMHO the only way that really make sens is to add options to madvise >> to give kernel information about usage. > > Maybe. It is cool that FreeBSD got this work via Alan Cox and the others that contributed. I am wondering if it makes sense to have an explicit model. At one place, for a platform with high performance but a very small TLB, we made it possible to explicitly request a large TLB for our process and it made a BIG difference for performance. Sometimes being "general purpose" means that you can expose such low level things for the user to tune instead of requiring them to fit the app to a heuristic that may change. -Alfred > > -Ben Kaduk > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" >