From owner-freebsd-arm@FreeBSD.ORG Thu Aug 1 14:20:00 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AC5DF9DC for ; Thu, 1 Aug 2013 14:20:00 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: from mail-qe0-f46.google.com (mail-qe0-f46.google.com [209.85.128.46]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 61AED25BD for ; Thu, 1 Aug 2013 14:20:00 +0000 (UTC) Received: by mail-qe0-f46.google.com with SMTP id i11so1143066qej.33 for ; Thu, 01 Aug 2013 07:19:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=N7aqLEQhpjXMBGamK2PKgHPkbLDx+X0KYwkPXgq4xh8=; b=BD156R5R0kdBLwCHFXFcJ7wmCR6qWHeAyMXnDh0Hoo9nMUsrDt5FYb319GWrZzOdVn xkIzTGS+ogYhYm8PACAwoCN6ZcU29JzwygdErc88N/ihVXmTodIFNvTNVquEAFEs3XlR /FW+EofX/4bY5ZucVcCXshtFSb9Bj/et1Rs2wT8uG4RbNrexZNJ9Jz7JITOcsqx04U9Y 0wcPQoAnFb5kTwKswyr0YxsvJX6NCk4lfP7Pnxw5X1kYFsnf/1kSX/gHsc6d0XCSTWoi gzseGRhAyc+eV2L6vVCVaLshRpG3kNbB4qbya9vboCwz6F+LKkm5jlyUSWxXVIPALpcr 2zbw== MIME-Version: 1.0 X-Received: by 10.49.12.114 with SMTP id x18mr2502043qeb.25.1375366793092; Thu, 01 Aug 2013 07:19:53 -0700 (PDT) Received: by 10.49.82.34 with HTTP; Thu, 1 Aug 2013 07:19:52 -0700 (PDT) In-Reply-To: <51F68F58.8060600@semihalf.com> References: <519B6B1C.9060008@semihalf.com> <20130522184232.GA437@jail.io> <519E0D62.5030708@semihalf.com> <51CC4CC1.4020509@semihalf.com> <51D57456.9080504@semihalf.com> <51F68F58.8060600@semihalf.com> Date: Thu, 1 Aug 2013 16:19:52 +0200 Message-ID: Subject: Re: New pmap-v6.c features and improvements From: Zbigniew Bodek To: "freebsd-arm@freebsd.org" Content-Type: multipart/mixed; boundary=047d7b6d817c23711004e2e389b7 X-Gm-Message-State: ALoCoQmt9OynHG/1fZatD91v0V/OmZtQvWIJpF/1Q/cYqWGkT/fnjEZAybrHe+UWMtLnwxa01nUF X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: ray@freebsd.org, Alan Cox 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: Thu, 01 Aug 2013 14:20:00 -0000 --047d7b6d817c23711004e2e389b7 Content-Type: text/plain; charset=ISO-8859-1 2013/7/29 Zbyszek Bodek > On 04.07.2013 19:34, Warner Losh wrote: > > > > On Jul 4, 2013, at 7:10 AM, Zbyszek Bodek wrote: > > > >> On 27.06.2013 16:31, Zbyszek Bodek wrote: > >>> On 23.05.2013 14:36, Zbyszek Bodek wrote: > >>>> On 22.05.2013 20:42, Ruslan Bukin wrote: > >>>>> On Tue, May 21, 2013 at 02:39:56PM +0200, Zbyszek Bodek wrote: > >>>>>> Hello Everyone, > >>>>>> > >>>>>> I would like to introduce another pack of patches for pmap-v6.c and > >>>>>> related, that we created as a part of Semihalf work on Superpages > >>>>>> support. > >>>>>> > >>>>>> The patches include some major changes like: > >>>>>> > >>>>>> - Switch to AP[1:0] access permissions model > >>>>>> - Transition of the mapping related flags to PTE (stop using PVF_ > flags > >>>>>> in pv_entry) > >>>>>> - Rework of the pmap_enter_locked() function > >>>>>> - pmap code optimizations > >>>>>> > >>>>>> And some minor clean-ups: > >>>>>> > >>>>>> - Get rid of the VERBOSE_INIT_ARM option > >>>>>> - Clean-ups, style and naming improvements to pmap > >>>>>> > >>>>>> Please check out the attachment for details. > >>>>>> > >>>>>> I will be happy to answer your questions and doubts if any. > >>>>>> > >>>>>> Best regards > >>>>>> Zbyszek Bodek > >>>>> > >>>>> I tested new patches with exynos5 and everything is OK. > >>>>> (I mean all works as usual) > >>>>> > >>>> > >>>> Hello. > >>>> > >>>> I'm happy to announce that code has been integrated to the FreeBSD > HEAD. > >>>> Great thanks your help! > >>>> > >>> > >>> Hello Everyone, > >>> > >>> We have two micro patches for pmap-v6.c containing fix for 'modified' > >>> bit emulation and removal of the redundant PGA_WRITEABLE clearing. > >>> > >>> Please check out the attachment. > >>> > >>> These two are minimal changes and we would like to commit them soon, so > >>> we would be grateful if you could test them on your ARMv6/v7 platforms > >>> and give us your remarks. > >>> > >> > >> Hello, > >> > >> Because there were no objections, we've integrated the patches: > >> > >> http://svnweb.freebsd.org/base?view=revision&revision=252694 > >> http://svnweb.freebsd.org/base?view=revision&revision=252695 > > > Hello Everyone, > > I'm sending another set of fixes for pmap-v6.c > Please see attachment. > > 0012 - Removal of the costly, frequent sweeping through the > pv_entries whenever pmap_nuke_pv(), pmap_modify_pv(), etc. > are called. This also makes order with clearing PGA_WRITEABLE > aflag as well as with the pmap_statistics related to the > wired_count. > 0013 - Fix for pamp_set_prot() where not all of the protection bits were > cleared before the actual configuration. L2_XN is not icluded to > the L2_S_PROT mask to maintain consistency between PROT_MASKS for > L2 and L1 descriptors - contain only kernel/user and > read/write permissions bits. > 0014 - Fix for pmap_change_wiring() where "wired" indicator of type > boolean was being used as a "wired flag" passed to > pmap_modify_pv() which was obviously not a valid PVF_WIRED flag. > > Please test those patches on your ARM-based machines and send your > feedback. We will also appreciate your reviews and remarks. > > Thank you in advance for your help. > > Hello, Are there any updates in this topic? In addition, I'm attaching two more minor improvements, this time: 0015 - small clean-ups in pmap_clearbit() that in general gives one relevant improvement which is to skip redundant "dirty" setting for a page. 0016 - removal of the unused pv_kva field from the md_page structure If there are no objections to that and earlier presented changes we would like to integrate them to the HEAD soon. Best regards Zbyszek Bodek --047d7b6d817c23711004e2e389b7 Content-Type: application/octet-stream; name="0015-Simplify-and-clean-up-redundant-statements-from-ARMv.patch" Content-Disposition: attachment; filename="0015-Simplify-and-clean-up-redundant-statements-from-ARMv.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hju1ukq03 RnJvbSBmOTJmNjgyMDJkNmRhZTRiMzBkNmJkODhjYTc5YjNiMjI2ZWEwY2RhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBaYmlnbmlldyBCb2RlayA8emJiQHNlbWloYWxmLmNvbT4KRGF0 ZTogTW9uLCAyOSBKdWwgMjAxMyAxOToxODoyMiArMDIwMApTdWJqZWN0OiBbUEFUQ0ggMS8yXSBT aW1wbGlmeSBhbmQgY2xlYW4tdXAgcmVkdW5kYW50IHN0YXRlbWVudHMgZnJvbSBBUk12Ni92Nwog cG1hcF9jbGVhcmJpdCgpCgpQVkZfTU9EIGlzIGFuIHVudXNlZCBmbGFnIGtlcHQganVzdCB0byBp bmRpY2F0ZSB3aGF0IGlzIHRvIGJlIGNsZWFyZWQKc2luY2UgUFRFJ3MgTDJfQVBYIHNob3dzIG1v ZGlmaWNhdGlvbiBzdGF0dXMuIFdoYXQgbW9yZSwgdGhlcmUgaXMgbm8gbmVlZApmb3IgY2FsbGlu ZyB2bV9wYWdlX2RpcnR5KCkgd2hlbiBjbGVhcmluZyAibW9kaWZpZWQiIGZsYWcgYXMgaXQgaXMg YWxyZWFkeQpzZXQgZm9yIHRoYXQgcGFnZSBpbiBwbWFwX2ZhdWx0X2ZpeHVwKCkgb3IgcG1hcF9l bnRlcigpIHRoYW5rcyB0bwoibW9kaWZpZWQiIGJpdCBlbXVsYXRpb24uClRoZXJlIGlzIGFs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2t2YVts MnB0ZV9pbmRleCh2YSldOwogCQlucHRlID0gb3B0ZSA9ICpwdGVwOwogCi0JCWlmICgobWFza2Jp dHMgJiAoUFZGX1dSSVRFfFBWRl9NT0QpKSAmJiBMMl9TX1dSSVRBQkxFKG9wdGUpKSB7Ci0JCQl2 bV9wYWdlX2RpcnR5KG0pOwotCisJCWlmIChtYXNrYml0cyAmIChQVkZfV1JJVEUgfCBQVkZfTU9E KSkgewogCQkJLyogbWFrZSB0aGUgcHRlIHJlYWQgb25seSAqLwogCQkJbnB0ZSB8PSBMMl9BUFg7 CiAJCX0KIAotCQlpZiAoKG1hc2tiaXRzICYgUFZGX1JFRikgJiYgTDJfU19SRUZFUkVOQ0VEKG9w dGUpKSB7CisJCWlmIChtYXNrYml0cyAmIFBWRl9SRUYpIHsKIAkJCS8qCiAJCQkgKiBDbGVhciBy ZWZlcmVuY2VkIGZsYWcgaW4gUFRFIHNvIHRoYXQgd2UKIAkJCSAqIHdpbGwgdGFrZSBhIGZsYWcg ZmF1bHQgdGhlIG5leHQgdGltZSB0aGUgbWFwcGluZwotLSAKMS44LjIKCg== --047d7b6d817c23711004e2e389b7 Content-Type: application/octet-stream; name="0016-Stop-using-redundant-pv_kva-field-in-md_page-structu.patch" Content-Disposition: attachment; filename="0016-Stop-using-redundant-pv_kva-field-in-md_page-structu.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hju1urxm4 RnJvbSAyNzhkNThjNDFkMjQxNDc0MjhlMWE5YjkxYWY0OGRlOTJkMDA3MWE2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBaYmlnbmlldyBCb2RlayA8emJiQHNlbWloYWxmLmNvbT4KRGF0 ZTogV2VkLCAzMSBKdWwgMjAxMyAxOToxOToyOCArMDIwMApTdWJqZWN0OiBbUEFUQ0ggMi8yXSBT dG9wIHVzaW5nIHJlZHVuZGFudCBwdl9rdmEgZmllbGQgaW4gbWRfcGFnZSBzdHJ1Y3R1cmUKIGZv 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