Date: Tue, 2 Oct 2007 16:53:33 -0700 (PDT) From: Jeff Roberson <jroberson@chesapeake.net> To: current@freebsd.org Subject: ULE/yielding patch for testing. Message-ID: <20071002165007.D587@10.0.0.1>
next in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-92347239-1191369213=:587 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Enclosed is a patch that does two things: 1) Reduces UP context switch time by over 10% making it faster than 4BSD on UP. On SMP it's hard to compare since ULE can do as many as 30x as many switches per second on my 8way system. 2) Restores old sched_yield() behavior from 6.x. This was changed in -current unintentionally I think. I'd appreciate any extra testing. The ULE context switch time improvements required some changes to the frequency that we recalculate priorities. I'm mostly interested in hearing whether this causes any regression in normal workloads. Those of you still using 4BSD can also verify that the yield changes don't cause any problems there. Thanks, Jeff --0-92347239-1191369213=:587 Content-Type: TEXT/x-diff; charset=US-ASCII; name=yield.diff Content-Transfer-Encoding: BASE64 Content-ID: <20071002165333.F587@10.0.0.1> Content-Description: Content-Disposition: attachment; filename=yield.diff SW5kZXg6IGtlcm5fc3dpdGNoLmMNCj09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0N ClJDUyBmaWxlOiAvaG9tZS9uY3ZzL3NyYy9zeXMva2Vybi9rZXJuX3N3aXRj aC5jLHYNCnJldHJpZXZpbmcgcmV2aXNpb24gMS4xMzYNCmRpZmYgLXAgLXUg LXIxLjEzNiBrZXJuX3N3aXRjaC5jDQotLS0ga2Vybl9zd2l0Y2guYwkyMCBT ZXAgMjAwNyAyMDozODo0MyAtMDAwMAkxLjEzNg0KKysrIGtlcm5fc3dpdGNo LmMJMiBPY3QgMjAwNyAyMTo0MToxMCAtMDAwMA0KQEAgLTEzMywxNiArMTMz LDYgQEAgY2hvb3NldGhyZWFkKHZvaWQpDQogew0KIAlzdHJ1Y3QgdGhyZWFk ICp0ZDsNCiANCi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cSwgdHMsIGZsYWdzKTsNCisJdGRxX2xvYWRf YWRkKHRkcSwgdHMpOw0KICNpZmRlZiBTTVANCisJY2xhc3MgPSBQUklfQkFT RSh0ZC0+dGRfcHJpX2NsYXNzKTsNCiAJY3B1bWFzayA9IDEgPDwgdHMtPnRz X2NwdTsNCiAJLyoNCiAJICogSWYgd2UgaGFkIGJlZW4gaWRsZSwgY2xlYXIg b3VyIGJpdCBpbiB0aGUgZ3JvdXAgYW5kIHBvdGVudGlhbGx5DQpAQCAtMjMz NCw4ICsyMzQ5LDYgQEAgdGRxX2FkZChzdHJ1Y3QgdGRxICp0ZHEsIHN0cnVj dCB0aHJlYWQgKg0KIAlpZiAodGQtPnRkX3ByaW9yaXR5IDwgdGRxLT50ZHFf bG93cHJpKQ0KIAkJdGRxLT50ZHFfbG93cHJpID0gdGQtPnRkX3ByaW9yaXR5 Ow0KICNlbmRpZg0KLQl0ZHFfcnVucV9hZGQodGRxLCB0cywgZmxhZ3MpOw0K LQl0ZHFfbG9hZF9hZGQodGRxLCB0cyk7DQogfQ0KIA0KIC8qDQpAQCAtMjUw Miw4ICsyNTE1LDYgQEAgdm9pZA0KIHNjaGVkX3JlbGlucXVpc2goc3RydWN0 IHRocmVhZCAqdGQpDQogew0KIAl0aHJlYWRfbG9jayh0ZCk7DQotCWlmICh0 ZC0+dGRfcHJpX2NsYXNzID09IFBSSV9USU1FU0hBUkUpDQotCQlzY2hlZF9w cmlvKHRkLCBQUklfTUFYX1RJTUVTSEFSRSk7DQogCVNDSEVEX1NUQVRfSU5D KHN3aXRjaF9yZWxpbnF1aXNoKTsNCiAJbWlfc3dpdGNoKFNXX1ZPTCwgTlVM TCk7DQogCXRocmVhZF91bmxvY2sodGQpOw0K --0-92347239-1191369213=:587--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071002165007.D587>