Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 18 Jan 2003 15:46:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 18 Jan 2003 15:46:15 -0500 Received: from franka.aracnet.com ([216.99.193.44]:25317 "EHLO franka.aracnet.com") by vger.kernel.org with ESMTP id ; Sat, 18 Jan 2003 15:46:08 -0500 Date: Sat, 18 Jan 2003 12:54:21 -0800 From: "Martin J. Bligh" To: Andrew Theurer cc: Christoph Hellwig , Robert Love , Michael Hohnbaum , Andrew Theurer , linux-kernel , lse-tech , Erich Focht , Ingo Molnar Subject: NUMA sched -> pooling scheduler (inc HT) Message-ID: <550960000.1042923260@titus> In-Reply-To: <270920000.1042822723@titus> References: <270920000.1042822723@titus> X-Mailer: Mulberry/2.2.1 (Linux/x86) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="==========1397890887==========" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org --==========1397890887========== Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Andrew, hopefully this'll give you a cleaner integration point to do the HT scheduler stuff ... I basically did a rename of "node" to "pool" on sched.c (OK, it was a little more complex than that), and provided some hooks for you to attatch to. There's a really hacky version of the HT stuff in there that I doubt works at all. (sched.h will need something other than CONFIG_SCHED_NUMA, for starters). It's not really finished, but I have to go out ... I thought you or someone else might like to have a play with it in the meantime. Goes on top of the second half of Ingo's stuff from yesterday (also attatched). I think this should result in a much cleaner integration between the HT aware stuff and the NUMA stuff. Pools is a concept Erich had in his scheduler a while back, but it got set aside in the paring down for integration. We should be able to add multiple levels to this fairly easily, at some point (eg HT + NUMA), but let's get the basics working first ;-) M. --==========1397890887========== Content-Type: application/octet-stream; name=01-ingo Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=01-ingo; size=6829 ZGlmZiAtdXJwTiAtWCAvaG9tZS9mbGV0Y2gvLmRpZmYuZXhjbHVkZSAwMC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HJxLCAwKTsKIH0KIAogdm9pZCBzY2hlZHVsaW5nX2Z1bmN0 aW9uc19zdGFydF9oZXJlKHZvaWQpIHsgfQpAQCAtMTE4NCw3ICsxMjA4LDcgQEAgbmVlZF9yZXNj aGVkOgogcGlja19uZXh0X3Rhc2s6CiAJaWYgKHVubGlrZWx5KCFycS0+bnJfcnVubmluZykpIHsK ICNpZiBDT05GSUdfU01QCi0JCWxvYWRfYmFsYW5jZShycSwgMSk7CisJCWxvYWRfYmFsYW5jZShy cSwgMSwgX19jcHVfdG9fbm9kZV9tYXNrKHNtcF9wcm9jZXNzb3JfaWQoKSkpOwogCQlpZiAocnEt Pm5yX3J1bm5pbmcpCiAJCQlnb3RvIHBpY2tfbmV4dF90YXNrOwogI2VuZGlmCg== --==========1397890887========== Content-Type: application/octet-stream; name=02-pools Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=02-pools; size=12912 ZGlmZiAtdXJwTiAtWCAvaG9tZS9mbGV0Y2gvLmRpZmYuZXhjbHVkZSAwMS1pbmdvL2FyY2gvaTM4 Ni9LY29uZmlnIDAyLXBvb2xzL2FyY2gvaTM4Ni9LY29uZmlnCi0tLSAwMS1pbmdvL2FyY2gvaTM4 Ni9LY29uZmlnCUZyaSBKYW4gMTcgMDk6MTg6MTkgMjAwMworKysgMDItcG9vbHMvYXJjaC9pMzg2 L0tjb25maWcJU2F0IEphbiAxOCAxMTo1OTo1NCAyMDAzCkBAIC00NzYsNiArNDc2LDExIEBAIGNv bmZpZyBOVU1BCiAJYm9vbCAiTnVtYSBNZW1vcnkgQWxsb2NhdGlvbiBTdXBwb3J0IgogCWRlcGVu ZHMgb24gWDg2X05VTUFRCiAKK2NvbmZpZyBTQ0hFRF9OVU1BCisJYm9vbCAiTlVNQSBhd2FyZSBz Y2hlZHVsZXIiCisJZGVwZW5kcyBvbiBOVU1BCisJZGVmYXVsdCB5CisKIGNvbmZpZyBESVNDT05U SUdNRU0KIAlib29sCiAJZGVwZW5kcyBvbiBOVU1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lzX2NwdSkpOwogCQlzcGluX3Vu bG9jaygmdGhpc19ycS0+bG9jayk7CiAJfQogfQpAQCAtMTIwOCw3ICsxMjA3LDcgQEAgbmVlZF9y ZXNjaGVkOgogcGlja19uZXh0X3Rhc2s6CiAJaWYgKHVubGlrZWx5KCFycS0+bnJfcnVubmluZykp IHsKICNpZiBDT05GSUdfU01QCi0JCWxvYWRfYmFsYW5jZShycSwgMSwgX19jcHVfdG9fbm9kZV9t YXNrKHNtcF9wcm9jZXNzb3JfaWQoKSkpOworCQlsb2FkX2JhbGFuY2UocnEsIDEsIGNwdV90b19w b29sX21hc2soc21wX3Byb2Nlc3Nvcl9pZCgpKSk7CiAJCWlmIChycS0+bnJfcnVubmluZykKIAkJ CWdvdG8gcGlja19uZXh0X3Rhc2s7CiAjZW5kaWYK --==========1397890887==========-- - 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/