From owner-freebsd-stable@FreeBSD.ORG Thu May 15 09:01:17 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A669D1065676; Thu, 15 May 2008 09:01:17 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from hosted.kievnet.com (hosted.kievnet.com [193.138.144.10]) by mx1.freebsd.org (Postfix) with ESMTP id 605CC8FC20; Thu, 15 May 2008 09:01:17 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost ([127.0.0.1] helo=edge.pp.kiev.ua) by hosted.kievnet.com with esmtpa (Exim 4.62) (envelope-from ) id 1JwZKt-0001RV-8H; Thu, 15 May 2008 12:01:15 +0300 Message-ID: <482BFBDA.6060705@icyb.net.ua> Date: Thu, 15 May 2008 12:01:14 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.12 (X11/20080320) MIME-Version: 1.0 To: "David Schwartz" References: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org, freebsd-threads@freebsd.org Subject: Re: thread scheduling at mutex unlock X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2008 09:01:17 -0000 David Schwartz wrote: > Are you out of your mind?! You are specifically asking for the absolute = > worst possible behavior! > > If you have fifty tiny things to do on one side of the room and fifty = > tiny things to do on the other side, do you cross the room after each = > one? Of course not. That would be *ludicrous*. > > If you want/need strict alternation, feel free to code it. But it's the = > maximally inefficient scheduler behavior, and it sure as hell had better = > not be the default. David, what if you have an infinite number of items on one side and finite number on the other, and you want to process them all (in infinite time, of course). Would you still try to finish everything on one side (the infinite one) or would you try to look at what you have on the other side? I am sorry about fuzzy wording of my original report, I should have mentioned "starvation" somewhere in it. -- Andriy Gapon