From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 13:33:57 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F3681065670 for ; Thu, 6 Mar 2008 13:33:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 6E7EB8FC25 for ; Thu, 6 Mar 2008 13:33:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id CE51B1A4D80; Thu, 6 Mar 2008 05:33:31 -0800 (PST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 6 Mar 2008 07:55:04 -0500 User-Agent: KMail/1.9.7 References: <47B9A359.9080502@icyb.net.ua> In-Reply-To: <47B9A359.9080502@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803060755.04607.jhb@freebsd.org> Cc: Andriy Gapon Subject: Re: sched_ule: roundrobin_callout replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 13:33:57 -0000 On Monday 18 February 2008 10:25:13 am Andriy Gapon wrote: > I see that sched_4bsd has a NOP callout with a purpose of forcing a > context switch (via softclock), so that something like a preemption > could happen (e.g. for threads in a tight calculation loop). > What serves the similar purpose for sched_ule? > Or, how sched_ule deals with the issue without needing softclock's help? It's gone in newer versions of 4BSD in HEAD actually. ULE does it by checking in sched_clock() to see if the current thread has used up its quantum. If so it sets TDF_NEEDRESCHED. -- John Baldwin