From owner-freebsd-arm@FreeBSD.ORG Tue Aug 27 11:31:47 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EDAA2BD3 for ; Tue, 27 Aug 2013 11:31:47 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7CA3D209B for ; Tue, 27 Aug 2013 11:31:47 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id mz12so1611552bkb.13 for ; Tue, 27 Aug 2013 04:31:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=hp3r92KMT6kxrMwPEWf/VC+UD4qixIbVAWoIzlTSDTk=; b=MObJY8kLadXw+5o3DIHgStCbDIUCiBiRQpGm8lrpROzze2+0jZHbU+nc7Byu0AhQJ9 8459GhsjkZLuCbf30/C8UCcB6lUb8u6yk+myKX9ffj3eVGckYsjBypjdjbY1ExJ/uE4I oSqwnHGLdpbI/4nmCz4oQjsaZqXuX04lFfL892MtKi1xHypNDSx7JV764KdbtTI0MRpR XRJMfPxirdue4O8IZu2Y84AvdI0R0DJlpwVNJR1oKAZLrwetCHuwU8e3G0CG1CRR9jE+ VrlERG+TYIWbcVkr1hLj9/aLgw3JvR5xkYO6r1vk4aezZXXNv0gOr8pjuMdZooa5Uyb/ xNYw== X-Gm-Message-State: ALoCoQlADpF6Hbj1Bc1cwql1l1ZTV9bmGD2B66BS1Hsaaew5B5qS/IMKvIK+MVCFV05NsKjk9JEc X-Received: by 10.205.33.207 with SMTP id sp15mr13203013bkb.2.1377596581876; Tue, 27 Aug 2013 02:43:01 -0700 (PDT) Received: from [10.0.2.117] (cardhu.semihalf.com. [213.17.239.108]) by mx.google.com with ESMTPSA id od6sm4052276bkb.11.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Aug 2013 02:43:01 -0700 (PDT) Message-ID: <521C74A3.4050207@semihalf.com> Date: Tue, 27 Aug 2013 11:42:59 +0200 From: Zbyszek Bodek Organization: Semihalf User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: fabiodive Subject: Re: HEADS UP: Superpages support for ARMv6/v7 References: <521BA6F6.3010308@semihalf.com> <0093E5B7-EC77-40AB-8AD4-0778E42993A6@gmail.com> In-Reply-To: <0093E5B7-EC77-40AB-8AD4-0778E42993A6@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 11:31:48 -0000 On 27.08.2013 11:36, fabiodive wrote: > Hello, > I am going to do some tests on my beagle bone black here, > please could you give me an hint about enabling the feature > into the kernel? Which directive should I use? > thank you > f. > Hello. If you are not using loader then open: sys/arm/arm/pmap-v6.c and set "sp_enabled = 0;" -> "sp_enabled = 1;" recompile. OR if using loader then set: vm.pmap.sp_enabled=1 in loader.conf Both methods are sufficient. Best regards Zbigniew Bodek > On Aug 26, 2013, at 8:05 PM, Zbyszek Bodek wrote: > >> Hello Everyone. >> >> I'm happy to announce that Superpages support for ARM has just been >> integrated to the FreeBSD HEAD: >> http://svnweb.freebsd.org/changeset/base/254918 >> >> This project was sponsored by The FreeBSD Foundation and Semihalf. >> It was developed with great support of Alan Cox (alc) who was also the >> technical reviewer of the code. Thank you very much Alan for all your help! >> I would also like to thank Grzegorz Bernacki (gber) and Rafal Jaworowski >> (raj) for mentoring and help with the code integration and all the >> people involved in testing of the patches and review. >> >> The code was tested on a quad-core, ARMv7, Marvell Armada XP SoC in SMP >> environment. >> >> Superpages is a feature that can increase TLB coverage and allow for >> efficient use of page table entries. Current implementation for ARM >> supports two page sizes: 4KB small pages (used as base pages) and 1MB >> sections (used as superpages). >> Superpages are created either directly by 1MB section insertion or as a >> result of promotion of 256 4KB pages. In both cases superpages creation >> and utilization depends on *sp_enabled* sysctl variable. >> >> By default, superpages support is disabled. >> In order to use this functionality one needs to set >> *vm.pmap.sp_enabled* tunable to non-zero value. This can be done either >> in loader.conf or by modifying *sp_enabled* variable in >> sys/arm/arm/pmap-v6.c . Statistics regarding superpages usage are >> available through: sysctl vm.pmap.section >> >> All ARMv6/v7-based platforms can take advantage from superpages, so >> please enable this feature on your ARM kernels. >> We will appreciate all your feedback regarding performance impact and >> general system behavior. >> >> Performance improvement should be visible in all tasks where intensive >> memory utilization is involved. GUPS (Giga Updates Per Second) benchmark >> can be used to show the difference in memory utilization efficiency with >> superpages enabled and disabled. GUPS src can be downloaded from here: >> http://people.freebsd.org/~raj/patches/arm/superpages/GUPS.tar.gz >> >> Exemplary GUPS results: >> -------------------------------------------------------------------- >> *superpages enabled* >> vm.pmap.section.promotions: 1024 >> vm.pmap.section.p_failures: 58 >> vm.pmap.section.mappings: 0 >> vm.pmap.section.demotions: 0 >> >> # ./gups >> Main table size = 2^27 = 134217728 words >> Number of updates = 536870912 >> CPU time used = 97.085938 seconds >> Real time used = 97.082504 seconds >> 0.005530048 Billion(10^9) Updates per second [GUP/s] >> >> vm.pmap.section.promotions: 2048 >> vm.pmap.section.p_failures: 58 >> vm.pmap.section.mappings: 0 >> vm.pmap.section.demotions: 0 >> >> * superpages disabled * >> Main table size = 2^27 = 134217728 words >> Number of updates = 536870912 >> CPU time used = 145.679688 seconds >> Real time used = 145.680798 seconds >> 0.003685255 Billion(10^9) Updates per second [GUP/s] >> -------------------------------------------------------------------- >> >> *Self host buildworld* >> World build time on Armada XP has shortened from 6h 36min to >> 5h 14min with superpages enabled. >> >> *Stress tests* >> stress --cpu 4 --io 4 --vm 2 --vm-bytes 800M >> Survived long time runs, large superpages creation ratio has been observed. >> >> *Swapping* >> No problems with swapping or system running under heavy load with >> shortage of memory have been observed. >> >> >> Please feel free to send your results. >> >> Best regards >> Zbigniew Bodek >> _______________________________________________ >> freebsd-arm@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-arm >> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >