From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 10 18:47:30 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DDC4C33C; Wed, 10 Apr 2013 18:47:30 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU [18.7.68.36]) by mx1.freebsd.org (Postfix) with ESMTP id 735D91A3; Wed, 10 Apr 2013 18:47:30 +0000 (UTC) X-AuditID: 12074424-b7f8c6d0000028c4-1d-5165b28fb71b Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP id 70.D7.10436.F82B5615; Wed, 10 Apr 2013 14:42:23 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH-1.MIT.EDU [18.9.28.11]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id r3AIgLDk023351; Wed, 10 Apr 2013 14:42:22 -0400 Received: from multics.mit.edu (SYSTEM-LOW-SIPB.MIT.EDU [18.187.2.37]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r3AIgIDX006700 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 10 Apr 2013 14:42:20 -0400 Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id r3AIgIaA013116; Wed, 10 Apr 2013 14:42:18 -0400 (EDT) Date: Wed, 10 Apr 2013 14:42:18 -0400 (EDT) From: Benjamin Kaduk To: Wojciech Puchar Subject: Re: Multiple page size support on FreeBSD? In-Reply-To: Message-ID: References: <201304101006.13960.jhb@freebsd.org> User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNIsWRmVeSWpSXmKPExsUixCmqrNu/KTXQoGc+v8X2zf8YLfYeuc5s 0XW7ldVi0q73bA4sHjM+zWfx2DnrLrvHg5thAcxRXDYpqTmZZalF+nYJXBlPth5mLPjDXnHz VxdrA+Miti5GTg4JAROJrwt7oWwxiQv31gPZXBxCAvsYJXZfPskC4WxklNhyYTIThHOISeLq 4/vMIC1CAg2MEktvgtksAtoSN2/NYQSx2QRUJGa+2Qg0ioNDBGhFz8FokDCzQKnE8emrmEBs YQFjiY75L8BaOQW8JBpXHWcFsXkFHCTOLJvADLFrOZPEngUzwM4TFdCRWL1/CgtEkaDEyZlP WCCGWkqc+3OdbQKj4CwkqVlIUgsYmVYxyqbkVunmJmbmFKcm6xYnJ+blpRbpmuvlZpbopaaU bmIEhTG7i8oOxuZDSocYBTgYlXh4D1amBgqxJpYVV+YeYpTkYFIS5bXcCBTiS8pPqcxILM6I LyrNSS0+xCjBwawkwmu9DCjHm5JYWZValA+TkuZgURLnvZ5y019IID2xJDU7NbUgtQgmK8PB oSTB6w4yVLAoNT21Ii0zpwQhzcTBCTKcB2i4C0gNb3FBYm5xZjpE/hSjopQ4ryFIQgAkkVGa B9cLSzOvGMWBXhHmzQSp4gGmKLjuV0CDmYAGG/angAwuSURISTUwytzcs8nNlDU2N/Sc/dr5 F1P+JR6Nm3KKjb1LuXerWPWPSyazS2rWqoUZmv7Ou2rYYfb4XpjCLf5as54y6RIBCzOTHR1s NxvCDFTXT+AVzOGPzBN9Kub04671rssfbn94/dRuy+fHU49M0rTquH5LSVdmDdO72ZNOmZre kBG5YnHjn5zsHcv1SizFGYmGWsxFxYkAICxmTQ4DAAA= Cc: freebsd-hackers@freebsd.org, Sebastian Feld 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 18:47:30 -0000 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. -Ben Kaduk