Date: Thu, 27 May 2010 19:56:26 +0530 From: "C. Jayachandran" <c.jayachandran@gmail.com> To: Randall Stewart <rrs@lakerest.net>, Neel Natu <neelnatu@gmail.com>, freebsd-mips@freebsd.org Subject: Few more fixes to the new pagetable page allocation code. Message-ID: <AANLkTimVM41XCZDN5pFmkr68D21i1JRwKF3m0IFJvYH8@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--000e0cd0ed460673a50487942d73 Content-Type: text/plain; charset=ISO-8859-1 The attached changes (http://people.freebsd.org/~jchandra/for-review/pmap-free-pte-page.diff) finally seems to get rid of the occasional hangs I saw during testing. The first part fixes a lock order reversal (in pmap_remove_pages...pmap_release_pte_page...uma_zfree_arg...kmem_malloc). The pmap and pagequeue locks have to be released before calling uma_zfree(). The second part takes the the pagequeue lock before changing the page fields of the pte page, I'm not sure this is necessary. Please let me know you comments. With these changes, I can get 'make -j128 buildworld' consistently work on a 32 cpu setup. Thanks, JC. --000e0cd0ed460673a50487942d73 Content-Type: text/x-patch; charset=US-ASCII; name="pmap-free-pte-page.diff" Content-Disposition: attachment; filename="pmap-free-pte-page.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g9po8fau0 SW5kZXg6IHN5cy9taXBzL21pcHMvcG1hcC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9taXBzL21pcHMv cG1hcC5jCShyZXZpc2lvbiAyMDg1ODkpCisrKyBzeXMvbWlwcy9taXBzL3BtYXAuYwkod29ya2lu ZyBjb3B5KQpAQCAtODg2LDggKzg4NiwxMiBAQAogCS8qCiAJICogSWYgdGhlIHBhZ2UgaXMgZmlu YWxseSB1bndpcmVkLCBzaW1wbHkgZnJlZSBpdC4KIAkgKi8KKwlhdG9taWNfc3VidHJhY3RfaW50 KCZjbnQudl93aXJlX2NvdW50LCAxKTsKKwlQTUFQX1VOTE9DSyhwbWFwKTsKKwl2bV9wYWdlX3Vu bG9ja19xdWV1ZXMoKTsKIAlwbWFwX3JlbGVhc2VfcHRlX3BhZ2UobSk7Ci0JYXRvbWljX3N1YnRy YWN0X2ludCgmY250LnZfd2lyZV9jb3VudCwgMSk7CisJdm1fcGFnZV9sb2NrX3F1ZXVlcygpOwor CVBNQVBfTE9DSyhwbWFwKTsKIAlyZXR1cm4gKDEpOwogfQogCkBAIC0xMDA4LDkgKzEwMTIsMTQg QEAKIAlwYWRkciA9IE1JUFNfS1NFRzBfVE9fUEhZUyh2YSk7CiAJbSA9IFBIWVNfVE9fVk1fUEFH RShwYWRkcik7CiAJCisJaWYgKCFsb2NrZWQpCisJCXZtX3BhZ2VfbG9ja19xdWV1ZXMoKTsKIAlt LT5waW5kZXggPSBpbmRleDsKIAltLT52YWxpZCA9IFZNX1BBR0VfQklUU19BTEw7CiAJbS0+d2ly ZV9jb3VudCA9IDE7CisJaWYgKCFsb2NrZWQpCisJCXZtX3BhZ2VfdW5sb2NrX3F1ZXVlcygpOwor CiAJYXRvbWljX2FkZF9pbnQoJmNudC52X3dpcmVfY291bnQsIDEpOwogCSp2YXAgPSAodm1fb2Zm c2V0X3QpdmE7CiAJcmV0dXJuIChtKTsK --000e0cd0ed460673a50487942d73--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimVM41XCZDN5pFmkr68D21i1JRwKF3m0IFJvYH8>