site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=XDmKRo+ZvSb5Vd8Coq6BEKK0lo6Z9rdGdWLVJ/XW6KA=; b=YELU5SOztQuimqlUbxG19s3mzmYAMZpZ2a8fZ6j6Px5TQjA/k+dC/+gGfDq4SlROQF zC/S4U47vWzxafM/Ithu1wV/BzMiWw8bg50eTGCRKiYwu1GtAg5CT/iHSRSlZLrFNwju 1Yt8BM3xSPdLaNSZtyzapq2KhJgDCJuPj43ng= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=t3H2wuDOlD4N0D9ajrn0jTHRzSJJNXHM9HStp0Fi5Jzj6SNqgX9PjvHsHweL+ZU2qE jpglD5syN0F2vnIKPke9Tak8Ivu7iFznzHbez1PRaXlRWfWnZDLphda8R/cG6Cvht+hW AAXpFm4MdKV9lmTweyFd5gdDmmEjexIxlqNrk= On Thu, Oct 2, 2008 at 10:45 AM, Terry Lambert <tlambert@apple.com> wrote:
There are so many good technical reasons as to why it would be a BAD design choice, it's hard to know where to start, so I won't.
One place that per-thread CPU pinning (or thread group scheduling) really is necessary is for scheduling of a multiprocessor virtual machine. In this case, if I have N threads (each of which is a virtual CPU of a virtual machine) I want to make sure they're either all scheduled concurrently on separate physical CPUs, or that none are scheduled. If only one of my N threads is scheduled when the virtual machine is busy, it's quite likely that one of the other (N - 1) virtual CPUs holds a resource or lock that the currently-scheduled thread needs. That means the currently-scheduled thread will spend a majority of its time looping in a spinlock, waiting for the one of the other threads to be scheduled. That just chews up CPU, when I'd rather give that CPU time to other processes' threads, until all of my virtual CPU threads can be concurrently scheduled. I can't currently do this with Mac OS X's scheduler, as far as I know. I just have to hope that all my virtual CPU threads happen to be scheduled concurrently. Ben _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com