Date: Wed, 26 May 2010 10:33:58 +0530 From: "C. Jayachandran" <c.jayachandran@gmail.com> To: Randall Stewart <rrs@lakerest.net>, Neel Natu <neelnatu@gmail.com>, freebsd-mips@freebsd.org Subject: Fixes to the new pagetable page allocation code. Message-ID: <AANLkTiluuD6YtgYBRj25FixyzGyrGNwQZmvB_nOeCFWN@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--000e0cd50a5a9601e804877833ad Content-Type: text/plain; charset=ISO-8859-1 The attached patch (also at http://people.freebsd.org/~jchandra/for-review/pmap-alloc-page-fix.diff) has two fixes for the new pagetable page allocation code, one to handle NULL return from the allocating function, and another to call VM_WAIT in cases we can wait. It also removes the variable 'req' left over from an earlier change. Please let me know if you have any comments... JC. --000e0cd50a5a9601e804877833ad Content-Type: text/x-patch; charset=US-ASCII; name="pmap-alloc-page-fix.diff" Content-Disposition: attachment; filename="pmap-alloc-page-fix.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g9mkdknk0 SW5kZXg6IHN5cy9taXBzL21pcHMvcG1hcC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9taXBzL21pcHMv cG1hcC5jCShyZXZpc2lvbiAyMDg1MzMpCisrKyBzeXMvbWlwcy9taXBzL3BtYXAuYwkod29ya2lu ZyBjb3B5KQpAQCAtOTY5LDEwICs5NjksMTUgQEAKIAkJKCJwbWFwX3B0cGd6b25lX2FsbG9jZjog aW52YWxpZCBhbGxvY2F0aW9uIHNpemUgJWQiLCBieXRlcykpOwogCiAJKmZsYWdzID0gVU1BX1NM QUJfUFJJVjsKLQltID0gdm1fcGh5c19hbGxvY19jb250aWcoMSwgMCwgTUlQU19LU0VHMF9MQVJH RVNUX1BIWVMsCi0JICAgICBQQUdFX1NJWkUsIFBBR0VfU0laRSk7Ci0JaWYgKG0gPT0gTlVMTCkK LQkJcmV0dXJuIChOVUxMKTsKKwlmb3IgKD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NX1dBSVRPSyIpKTsKIAotCXJlcSA9IFZN X0FMTE9DX1dJUkVEIHwgVk1fQUxMT0NfWkVSTyB8IFZNX0FMTE9DX05PT0JKOwogCS8qCiAJICog RmluZCBvciBmYWJyaWNhdGUgYSBuZXcgcGFnZXRhYmxlIHBhZ2UKIAkgKi8K --000e0cd50a5a9601e804877833ad--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTiluuD6YtgYBRj25FixyzGyrGNwQZmvB_nOeCFWN>