From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 10 20:22:28 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 DB5C1C9E for ; Wed, 10 Apr 2013 20:22:28 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og119.obsmtp.com (exprod7og119.obsmtp.com [64.18.2.16]) by mx1.freebsd.org (Postfix) with ESMTP id 8CC3F859 for ; Wed, 10 Apr 2013 20:22:28 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob119.postini.com ([64.18.6.12]) with SMTP ID DSNKUWXJ/i49CeLFkCDVhS3q4k8jr073xh7l@postini.com; Wed, 10 Apr 2013 13:22:28 PDT Received: from P-CLDFE01-HQ.jnpr.net (172.24.192.59) by P-EMHUB03-HQ.jnpr.net (172.24.192.37) with Microsoft SMTP Server (TLS) id 8.3.213.0; Wed, 10 Apr 2013 13:09:38 -0700 Received: from o365mail.juniper.net (207.17.137.149) by o365mail.juniper.net (172.24.192.59) with Microsoft SMTP Server id 14.1.355.2; Wed, 10 Apr 2013 13:09:38 -0700 Received: from va3outboundpool.messaging.microsoft.com (216.32.180.16) by o365mail.juniper.net (207.17.137.149) with Microsoft SMTP Server (TLS) id 14.1.355.2; Wed, 10 Apr 2013 13:12:07 -0700 Received: from mail214-va3-R.bigfish.com (10.7.14.230) by VA3EHSOBE009.bigfish.com (10.7.40.29) with Microsoft SMTP Server id 14.1.225.23; Wed, 10 Apr 2013 20:09:37 +0000 Received: from mail214-va3 (localhost [127.0.0.1]) by mail214-va3-R.bigfish.com (Postfix) with ESMTP id 1BAC888010E for ; Wed, 10 Apr 2013 20:09:37 +0000 (UTC) X-Forefront-Antispam-Report: CIP:157.56.244.213; KIP:(null); UIP:(null); (null); H:CH1PRD0510HT003.namprd05.prod.outlook.com; R:internal; EFV:INT X-SpamScore: -5 X-BigFish: PS-5(zzbb2dI98dI9371I542I1432Izz1f42h1fc6h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ahzz17326ah8275dh8275chz2dh2a8h668h839h947hd25hf0ah1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h19ceh1ad9h1b0ah1155h) Received: from mail214-va3 (localhost.localdomain [127.0.0.1]) by mail214-va3 (MessageSwitch) id 136562457555068_27568; Wed, 10 Apr 2013 20:09:35 +0000 (UTC) Received: from VA3EHSMHS004.bigfish.com (unknown [10.7.14.230]) by mail214-va3.bigfish.com (Postfix) with ESMTP id F3C96D40061; Wed, 10 Apr 2013 20:09:34 +0000 (UTC) Received: from CH1PRD0510HT003.namprd05.prod.outlook.com (157.56.244.213) by VA3EHSMHS004.bigfish.com (10.7.99.14) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 10 Apr 2013 20:09:33 +0000 Received: from CH1PRD0510MB392.namprd05.prod.outlook.com ([169.254.6.36]) by CH1PRD0510HT003.namprd05.prod.outlook.com ([10.255.150.38]) with mapi id 14.16.0293.003; Wed, 10 Apr 2013 20:09:33 +0000 From: Andrew Duane To: Alfred Perlstein , Benjamin Kaduk Subject: RE: Multiple page size support on FreeBSD? Thread-Topic: Multiple page size support on FreeBSD? Thread-Index: AQHONiYhR4l/DNF6FkudeEdNuuszSpjP4RAw Date: Wed, 10 Apr 2013 20:09:32 +0000 Message-ID: <477C1270D3E5484DA2303CEBE274C9E1250B3DF7@CH1PRD0510MB392.namprd05.prod.outlook.com> References: <201304101006.13960.jhb@freebsd.org> <5165C4D7.3050308@mu.org> In-Reply-To: <5165C4D7.3050308@mu.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [66.129.232.2] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-FOPE-CONNECTOR: Id%12219$Dn%MU.ORG$RO%2$TLS%5$FQDN%onpremiseedge-1018244.customer.frontbridge.com$TlsDn%o365mail.juniper.net X-FOPE-CONNECTOR: Id%12219$Dn%MIT.EDU$RO%2$TLS%5$FQDN%onpremiseedge-1018244.customer.frontbridge.com$TlsDn%o365mail.juniper.net X-FOPE-CONNECTOR: Id%12219$Dn%WOJTEK.TENSOR.GDYNIA.PL$RO%2$TLS%5$FQDN%onpremiseedge-1018244.customer.frontbridge.com$TlsDn%o365mail.juniper.net X-FOPE-CONNECTOR: Id%12219$Dn%GMAIL.COM$RO%2$TLS%5$FQDN%onpremiseedge-1018244.customer.frontbridge.com$TlsDn%o365mail.juniper.net X-FOPE-CONNECTOR: Id%12219$Dn%FREEBSD.ORG$RO%2$TLS%5$FQDN%onpremiseedge-1018244.customer.frontbridge.com$TlsDn%o365mail.juniper.net 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:22:28 -0000 Like all "performance" items (especially VM), it depends on the hardware an= d the load. On systems with small TLBs it helps more than with large TLBs. = With software that needs access to lots of different areas the TLB gets mor= e traffic so large ones help more. The answer for your firefox browser box = with i386 is probably different from my compilation engine running MIPS, or= his web server running AMD. Back at Digital, we spent a lot of time trying to find the "one true answer= " to superpages, only to discover there wasn't one. We ended up with a comb= ination of automatic use from big allocations, a rarely used API to advise = for big TLBs, and some background work that coalesced when possible. =A0.................................... Andrew L. Duane Resident Architect - AT&T Technical Lead m=A0=A0=A0+1 603.770.7088 o +1 408.933.6944 (2-6944) skype: andrewlduane aduane@juniper.net -----Original Message----- From: owner-freebsd-hackers@freebsd.org [mailto:owner-freebsd-hackers@freeb= sd.org] On Behalf Of Alfred Perlstein Sent: Wednesday, April 10, 2013 4:00 PM To: Benjamin Kaduk Cc: Wojciech Puchar; Sebastian Feld; freebsd-hackers@freebsd.org Subject: Re: Multiple page size support on FreeBSD? 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=20 >>> superpages or are you relying on the vm.pmap.pde sysctls? >> >> the later. >> >> anyway - algorithm described on list - that heuristics detects=20 >> consecutive page access doesn't really help the urgent case - RANDOM=20 >> access to large amount of memory. > > The algorithm is not a heuristic based on consecutive accesses,=20 > promotion occurs when the entire superpage's worth of memory has=20 > actually been accessed. If I remember correctly, the performance gain=20 > from superpages was only a few percent, so spending more time trying=20 > 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=20 > was quite interesting. > >> sequential access will get minimal improvement. >> >> IMHO the only way that really make sens is to add options to madvise=20 >> to give kernel information about usage. > > Maybe. It is cool that FreeBSD got this work via Alan Cox and the others that cont= ributed. 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 h= euristic that may change. -Alfred > > -Ben Kaduk > _______________________________________________ > freebsd-hackers@freebsd.org mailing list=20 > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" > _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/l= istinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"