--Multipart_Mon__28_Oct_2002_10:58:49_+0900_08273d60
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
This is a transparent superpage support patch for 2.5.44.
Big difference between this patch and 2.4.19 patch is
eliminating of automatic dynamic downgrade for superpages.
Instead, I place pagesize adjust routine where required.
I hope this change minimize the overhead for conventional
programs which does not use superpages.
Linux SuperPage patch is transparent for user applications.
It will automatically allocate appropriate size of superpages
if possible.
It does not allocate real strage unless the application
really access that area. And it does not allocate memory
larger than the application requests.
This patch includes i386, alpha, sparc64 ports.
But I could not compile for alpha even with plain 2.5.44, and
I don't have sparc64 to test, then only i386 was tested now.
Any comments will be welcome.
I am not on this list, then please CC me for any comments.
-- Naohiko Shimizu Dept. Communications Engineering/Tokai University 1117 Kitakaname Hiratsuka 259-1292 Japan TEL.+81-463-58-1211(ext. 4084) FAX.+81-463-58-8320 http://shimizu-lab.dt.u-tokai.ac.jp/
--Multipart_Mon__28_Oct_2002_10:58:49_+0900_08273d60 Content-Type: application/octet-stream; name="super_page-2.5.44_021028.patch" Content-Disposition: attachment; filename="super_page-2.5.44_021028.patch" Content-Transfer-Encoding: base64
ZGlmZiAtdXJOIGxpbnV4LTIuNS40NC9Eb2N1bWVudGF0aW9uL3N1cGVyX3BhZ2UudHh0IGxpbnV4 LTIuNS40NC1zdXBlcnBhZ2UvRG9jdW1lbnRhdGlvbi9zdXBlcl9wYWdlLnR4dAotLS0gbGludXgt Mi41LjQ0L0RvY3VtZW50YXRpb24vc3VwZXJfcGFnZS50eHQJVGh1IEphbiAgMSAwOTowMDowMCAx OTcwCisrKyBsaW51eC0yLjUuNDQtc3VwZXJwYWdlL0RvY3VtZW50YXRpb24vc3VwZXJfcGFnZS50 eHQJU3VuIE9jdCAyNyAxNzoyNjoxNyAyMDAyCkBAIC0wLDAgKzEsNzUgQEAKK1RoZSBzdXBlciBw YWdlIGlzIGEgZmVhdHVyZSB3aGljaCBleHRlbmQgdGhlIFRMQiBjb3ZlcmFnZSBtdWNo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G9zLCBpbnQgbGVuZ3RoKQorewor ICAgICAgaW50IGk7CisgICAgICBjaGFyICpwID0gYnVmOworCisgICAgICBwICs9IHNwcmludGYo cCwgImN1cnJlbnQgb246ICVkXG4iLCBzdXBlcl9wYWdlX29uKTsKKyAgICAgIHAgKz0gc3ByaW50 ZihwLCAiY3VycmVudCBucjogJWRcbiIsIHN1cGVyX3BhZ2VfbnIpOworICAgICAgcCArPSBzcHJp bnRmKHAsICJjdXJyZW50IGJpdG1hc2s6ICVkXG4iLCBzdXBlcl9wYWdlX2JpdG1hc2spOworICAg ICAgcCArPSBzcHJpbnRmKHAsICJjdXJyZW50IHZtX2FsaWduOiAlZFxuIiwgc3VwZXJfcGFnZV92 bV9hbGlnbik7CisgICAgICBwICs9IHNwcmludGYocCwgIm9yZGVyXHRyZXNlcnZlXHRhbGxvY2F0 ZVx0ZmFpbCBcbiIpOworICAgICAgZm9yKGk9MTtpPFNVUEVSX1BBR0VfTlI7aSsrKSB7CisgICAg ICBwICs9IHNwcmludGYocCwgIiVkOlx0JWxkXHQlbGRcdCVsZFxuIiwKKyAgICAgICAgICAgICAg IHN1cGVyX3BhZ2Vfb3JkZXJbaV0sCisgICAgICAgICAgICAgICBzdXBlcl9wYWdlX3Jlc2VydmVb aV0sCisgICAgICAgICAgICAgICBzdXBlcl9wYWdlX2FsbG9jYXRlW2ldLAorICAgICAgICAgICAg ICAgc3VwZXJfcGFnZV9kb3duZ3JhZGVbaV0KKyAgICAgICAgICAgICAgICk7CisgICAgICB9Cisg ICAgICBpZihzdXBlcl9wYWdlX2xvZ3Jlc2V0KQorICAgICAgZm9yKGk9MTtpPFNVUEVSX1BBR0Vf TlI7aSsrKSB7CisgICAgICAgICAgICAgICBzdXBlcl9wYWdlX3Jlc2VydmVbaV0gPSAwOworICAg ICAgICAgICAgICAgc3VwZXJfcGFnZV9hbGxvY2F0ZVtpXSA9IDA7CisgICAgICAgICAgICAgICBz dXBlcl9wYWdlX2Rvd25ncmFkZVtpXSA9ID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IGFkZHJlc3MpOwor ICAgICAgICBwbWQgPSBwbWRfYWxsb2MobW0sIGRpciwgYWRkcmVzcyk7CisgICAgICAgIGlmICgh cG1kKSBnb3RvIG91dDsKKyAgICAgICAgYWRkcmVzcyAmPSB+UEdESVJfTUFTSzsKKyAgICAgICAg cHRlID0gcHRlX2FsbG9jX21hcChtbSwgcG1kLCBhZGRyZXNzKTsKKyAgICAgICAgaWYgKCFwdGUp CisgICAgICAgICAgICAgICAgZ290byBvdXQ7CisgICAgICAgIGZvciAoaSA9IDA7IGkgPCAxPDxv cmRlcjsgaSArKykKKyAgICAgICAgICAgICAgICBpZighcHRlX25vbmUoKihwdGUraSkpKSBnb3Rv IG91dDsKKyAgICAgICAgZm9yIChpID0gMDsgaSA8IDE8PG9yZGVyOyBpICsrKSB7CisgICAgICAg ICAgICAgICAgc2V0X3B0ZV9yYXcocHRlLCBwdGVfbW9kaWZ5KCpwdGUsIHByb3QpKTsKKyAgICAg ICAgICAgICAgICBwdGUrKzsKKyAgICAgICAgfQorb3V0OgorCXNwaW5fdW5sb2NrKCZtbS0+cGFn ZV90YWJsZV9sb2NrKTsKKyAgICAgICAgcmV0dXJuOworICB9CisgIAorICAvKgorICAgKiBTaW1w bGlzdGljIG5ldyBwYWdlIHRhYmxlIGFsbG9jYXRpb24gZm9yIHN5c19icmsuLgorICAgKiBPbmx5 IEdIIGJpdCAhPSAwIHRhYmxlcyB3aWxsIGJlIGFsbG9jYXRlZC4KKyAgICogQXQgdGhpcyB0aW1l LCB3ZSB3aWxsIG5vdCBhbGxvY2F0ZSByZWFsIHN0b3JhZ2UsIGl0IHJlbWFpbnMKKyAgICogZm9y IHRoZSBwYWdlX2ZhdWx0IGhhbmRsZXIuCisgICAqLworaW50IG1ha2VfcHRlc19wcmVzZW50KHVu c2lnbmVkIGxvbmcgYWRkciwgdW5zaWduZWQgbG9uZyBlbmQpCisgIHsKKyAgICAgICAgaW50IGk7 CisgICAgICAgIHVuc2lnbmVkIGxvbmcgcmVtOworICAgICAgICBpZiAoYWRkciA+PSBlbmQpCisg ICAgICAgICAgICAgICAgQlVHKCk7CisjaWYgU1VQRVJfUEFHRV9ERUJVRworCXByaW50aygibWFr ZV9wdGVzX3ByZXNlbnRcbiIpOworI2VuZGlmCisgIC8qCisgICAqIFRoZSBmaXJzdCBvcmRlcihp PTApIGlzIHRoZSBvcmRpbmFyeSBwdGUgKDFwYWdlKSwgdGhlbiB3ZSBza2lwIHRvCisgICAqIGFs bG9jYXRlIHRoZSBwdGUuCisgICAqLworICAgICAgICBmb3IgKGkgPSAwOyBpIDwgc3VwZXJfcGFn ZV9uciAtIDE7IGkrKykgeworICAgICAgICAgICByZW0gPSAofmFkZHIgKyAxKSAmICgoUEFHRV9T SVpFIDw8IHN1cGVyX3BhZ2Vfb3JkZXJbaSsxXSkgLSAxKTsKKyAgICAgICAgICAgd2hpbGUgKHJl bSAmJgorICAgICAgICAgICAgICAgICAgKGFkZHIgJiAoKFBBR0VfU0laRSA8PCBzdXBlcl9wYWdl X29yZGVyW2ldKSAtIDEpKSA9PSAwVUwgJiYKKyAgICAgICAgICAgICAgICAgICgoZW5kIC0gYWRk ciApID49IChQQUdFX1NJWkUgPDwgc3VwZXJfcGFnZV9vcmRlcltpXSkpKSB7CisgICAgICAgICAg ICAgICAgICBpZihpJiZzdXBlcl9wYWdlX2JpdG1hc2sgJiAoMTw8aSkpIHsKKyAgICAgICAgICAg ICAgICAgICBzdXBlcl9wYWdlX3Jlc2VydmVbaV0rKzsKKyAgICAgICAgICAgICAgICAgICBzZXRf c3BfcmFuZ2UoYWRkciwgc3VwZXJfcGFnZV9vcmRlcltpXSwgc3VwZXJfcGFnZV9wcm90W2ldKTsK KyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIGFkZHIgKz0gUEFH RV9TSVpFIDw8IHN1cGVyX3BhZ2Vfb3JkZXJbaV07CisgICAgICAgICAgICAgICAgICAgICAgICBy ZW0gIC09IFBBR0VfU0laRSA8PCBzdXBlcl9wYWdlX29yZGVyW2ldOworICAgICAgICAgICAgICAg IH0KKyAgICAgICAgfQorICAgICAgICBmb3IgKGkgPSBzdXBlcl9wYWdlX25yIC0gMTsgaSA+IDA7 IGktLSkgeworICAgICAgICAgICAgICAgIHdoaWxlICgKKyAgICAgICAgICAgICAgICAgICAgKGFk ZHIgJiAoKFBBR0VfU0laRSA8PCBzdXBlcl9wYWdlX29yZGVyW2ldKSAtIDEpKSA9PSAwVUwgJiYK KyAgICAgICAgICAgICAgICAgICAgKChlbmQgLSBhZGRyICkgPj0gKFBBR0VfU0laRSA8PCBzdXBl cl9wYWdlX29yZGVyW2ldKSkpIHsKKyAgICAgICAgICAgICAgICAgICAgIGlmKHN1cGVyX3BhZ2Vf Yml0bWFzayAmICgxPDxpKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgc3VwZXJfcGFnZV9y ZXNlcnZlW2ldKys7CisgICAgICAgICAgICAgICAgICAgICAgICBzZXRfc3BfcmFuZ2UoYWRkciwg c3VwZXJfcGFnZV9vcmRlcltpXSwgc3VwZXJfcGFnZV9wcm90W2ldKTsKKyAgICAgICAgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIGFkZHIgKz0gUEFHRV9TSVpFIDw8IHN1 cGVyX3BhZ2Vfb3JkZXJbaV07CisgICAgICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAg IHJldHVybiAwOworICB9CisKK3ZvaWQgYWRqX3NwX3B0ZShzdHJ1Y3QgbW1fc3RydWN0ICptbSwg aW50IHphcCwKKyAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgYWRkcmVzcywgaW50IG9yZGVy KQorICB7CisgICAgICAgIGludCBpLGRvd25ncmFkZTsKKyAgICAgICAgcGdkX3QgKiBkaXI7Cisg ICAgICAgIHBtZF90ICpwbWQ7CisgICAgICAgIHB0ZV90ICogcHRlOworICAKKyAgICAgICAgZG93 bmdyYWRlPTA7CisgICAgICAgIGRpciA9IHBnZF9vZmZzZXQobW0sIGFkZHJlc3MpOworICAgICAg ICBwbWQgPSBwbWRfb2Zmc2V0KGRpciwgYWRkcmVzcyk7CisgICAgICAgIGlmICghcG1kKSByZXR1 cm47CisgICAgICAgIGFkZHJlc3MgJj0gflBHRElSX01BU0s7CisgICAgICAgIHB0ZSA9IHB0ZV9v ZmZzZXRfbWFwKHBtZCwgYWRkcmVzcyk7CisgICAgICAgIGlmICghcHRlKSByZXR1cm47CisvKgor V2UgYXNzdW1lIHRoYXQgdGhlIGxhcmdlc3Qgc3VwZXIgcGFnZSBpcyBsZXNzIG9yIGVxdWFsIHRv IHRoZQorbWFwcGVkIGFyZWEgYnkgdGhlIHBtZC4gVGhlbiBmb2xsb3dpbmcgY29kZSBkb2VzIG5v dCB0YWtlCit0aGUgcG1kX29mZnNldCBhZ2Fpbi4gSWYgeW91IHdhbnQgdG8gdXNlIGEgbGFyZ2Vy IHN1cGVyIHBhZ2UsCit5b3UgbmVlZCB0byBjaGVjayB0aGUgY29kZS4KKyovCisgICAgICAgIGZv ciAoaSA9IDA7IGkgPCAxPDxvcmRlcjsgaSArKykgeworIHJldHJ5OgorICAgICAgICAgICBpZihz dXBlcl9wYWdlX29yZGVyW3B0ZV90b19zcF9pbmRleCgqKHB0ZStpKSldPm9yZGVyKSB7CisgICAg ICAgICAgICAgICAgZG93bl9wdGVfc3AocHRlK2kscHRlX3RvX3NwX2luZGV4KCoocHRlK2kpKSk7 CisgICAgICAgICAgICAgICAgZG93bmdyYWRlPTE7CisgICAgICAgICAgICAgICAgZ290byByZXRy eTsKKyAgICAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBpZih6YXApIGNsZWFyX3B0 ZV9zcChwdGUsIHB0ZV90b19zcF9pbmRleCgqcHRlKSk7CisgICAgICAgIGlmKHphcHx8ZG93bmdy YWRlKSBjbGVhcl9wbWRfc3AocG1kKTsKKyAgICAgICAgcmV0dXJuOworICB9CisgIAordm9pZCBh ZGpfc3BfcmFuZ2Uoc3RydWN0IG1tX3N0cnVjdCAqbW0sIGludCB6YXAsIAorICAgICAgICAgICAg ICAgICAgdW5zaWduZWQgbG9uZyBhZGRyLCB1bnNpZ25lZCBsb25nIGVuZCkKKyAgeworICAgICAg ICBpbnQgaTsKKyAgICAgICAgdW5zaWduZWQgbG9uZyByZW07CisgICAgICAgIGlmIChhZGRyID49 IGVuZCkKKyAgICAgICAgICAgICAgICBCVUcoKTsKKworI2lmIFNVUEVSX1BBR0VfREVCVUcKKwlw cmludGsoImFkal9zcF9yYW5nZSBtbTolcCwgYWRkcjolMGx4LCBlbmQ6JTBseFxuIixtbSxhZGRy LGVuZCk7CisjZW5kaWYKKyAgICAgICAgZm9yIChpID0gMDsgaSA8IHN1cGVyX3BhZ2VfbnIgLSAx OyBpKyspIHsKKyAgICAgICAgICAgcmVtID0gKH5hZGRyICsgMSkgJiAoKFBBR0VfU0laRSA8PCBz dXBlcl9wYWdlX29yZGVyW2krMV0pIC0gMSk7CisgICAgICAgICAgIHdoaWxlIChyZW0gJiYKKyAg ICAgICAgICAgICAgICAgIChhZGRyICYgKChQQUdFX1NJWkUgPDwgc3VwZXJfcGFnZV9vcmRlcltp XSkgLSAxKSkgPT0gMFVMICYmCisgICAgICAgICAgICAgICAgICAoKGVuZCAtIGFkZHIgKSA+PSAo UEFHRV9TSVpFIDw8IHN1cGVyX3BhZ2Vfb3JkZXJbaV0pKSkgeworICAgICAgICAgICAgICAgICAg ICAgICAgYWRqX3NwX3B0ZShtbSwgemFwLCBhZGRyLCBzdXBlcl9wYWdlX29yZGVyW2ldKTsKKyAg ICAgICAgICAgICAgICAgICAgICAgIGFkZHIgKz0gUEFHRV9TSVpFIDw8IHN1cGVyX3BhZ2Vfb3Jk ZXJbaV07CisgICAgICAgICAgICAgICAgICAgICAgICByZW0gIC09IFBBR0VfU0laRSA8PCBzdXBl cl9wYWdlX29yZGVyW2ldOworICAgICAgICAgICAgICAgIH07CisgICAgICAgIH0KKyAgICAgICAg Zm9yIChpID0gc3VwZXJfcGFnZV9uciAtIDE7IGkgPj0gMDsgaS0tKSB7CisgICAgICAgICAgICAg ICAgd2hpbGUgKAorICAgICAgICAgICAgICAgICAgICAoYWRkciAmICgoUEFHRV9TSVpFIDw8IHN1 cGVyX3BhZ2Vfb3JkZXJbaV0pIC0gMSkpID09IDBVTCAmJgorICAgICAgICAgICAgICAgICAgICAo KGVuZCAtIGFkZHIgKSA+PSAoUEFHRV9TSVpFIDw8IHN1cGVyX3BhZ2Vfb3JkZXJbaV0pKSkgewor ICAgICAgICAgICAgICAgICAgICAgICAgYWRqX3NwX3B0ZShtbSwgemFwLCBhZGRyLCBzdXBlcl9w YWdlX29yZGVyW2ldKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFkZHIgKz0gUEFHRV9TSVpF IDw8IHN1cGVyX3BhZ2Vfb3JkZXJbaV07CisgICAgICAgICAgICAgICAgfTsKKyAgICAgICAgfQor I2lmIFNVUEVSX1BBR0VfREVCVUcKKwlwcmludGsoImFkal9zcF9yYW5nZSByZXR1cm5cbiIpOwor I2VuZGlmCisgICAgICAgIHJldHVybjsKKyAgfQorCit2b2lkIF9fYnJlYWtfYXJlYSAoc3RydWN0 IHBhZ2UgKnBhZ2UsIHVuc2lnbmVkIGxvbmcgb3JkZXIpIHsKKwlpbnQgaTsKKwl1bnNpZ25lZCBs b25nIHNpemUgPSAxIDw8IG9yZGVyOworCisJZm9yICggaSA9IDA7IGkgPCBzaXplOyBpKysgKSB7 CisJCXNldF9wYWdlX2NvdW50KHBhZ2UgKyBpLCAxKTsKKwl9CisJcmV0dXJuOworfQorCit2b2lk IGRvd25fcHRlX3NwKHB0ZV90ICpwdGVwdHIsIGludCBpbmRleCkgeworCWludCBpLG9yZGVyOwor CXB0ZV90ICphZGRyOworCW9yZGVyID0gc3VwZXJfcGFnZV9vcmRlcltpbmRleF07CisJYWRkciA9 IChwdGVfdCAqKSgodW5zaWduZWQgbG9uZykgcHRlcHRyICYgCisJCX4oKDFVTDw8KG9yZG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hdCBP Y3QgMTkgMTM6MDE6MTcgMjAwMgorKysgbGludXgtMi41LjQ0LXN1cGVycGFnZS9tbS9zd2FwZmls ZS5jCVN1biBPY3QgMjcgMTc6MDI6MDYgMjAwMgpAQCAtNDU0LDYgKzQ1NCw5IEBACiAKIAlpZiAo c3RhcnQgPj0gZW5kKQogCQlCVUcoKTsKKyNpZiBDT05GSUdfU1VQRVJfUEFHRQorCWFkal9zcF9y YW5nZSh2bWEtPnZtX21tLCAxLCBzdGFydCwgZW5kKTsKKyNlbmRpZgogCWRvIHsKIAkJdW51c2Vf cGdkKHZtYSwgcGdkaXIsIHN0YXJ0LCBlbmQgLSBzdGFydCwgZW50cnksIHBhZ2UpOwogCQlzdGFy dCA9IChzdGFydCArIFBHRElSX1NJWkUpICYgUEdESVJfTUFTSzsK
--Multipart_Mon__28_Oct_2002_10:58:49_+0900_08273d60-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/