From owner-cvs-src@FreeBSD.ORG Thu Jun 15 09:30:18 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FB1B16A47C; Thu, 15 Jun 2006 09:30:18 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id B95C743D4C; Thu, 15 Jun 2006 09:30:00 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 9DDBF46C1F; Thu, 15 Jun 2006 05:29:59 -0400 (EDT) Date: Thu, 15 Jun 2006 10:29:59 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Xin LI In-Reply-To: <1150363262.937.44.camel@spirit> Message-ID: <20060615102900.C9158@fledge.watson.org> References: <200606150637.k5F6bdax000157@repoman.freebsd.org> <1150363262.937.44.camel@spirit> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1050479043-1150363799=:9158" Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, David Xu , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys sched.h src/sys/posix4 ksched.c src/sys/kern sched_4bsd.c sched_core.c sched_ule.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2006 09:30:18 -0000 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-1050479043-1150363799=:9158 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 15 Jun 2006, Xin LI wrote: > =FF=FF 2006-06-15=FF=FF=FF=FF 06:37 +0000=FF=FFDavid Xu=FF=FF=FF=FF=FF=FF >> davidxu 2006-06-15 06:37:39 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/sys sched.h >> sys/posix4 ksched.c >> sys/kern sched_4bsd.c sched_core.c sched_ule.c >> Log: >> Add scheduler API sched_relinquish(), the API is used to implement >> yield() and sched_yield() syscalls. Every scheduler has its own way >> to relinquish cpu, the ULE and CORE schedulers have two internal run- >> queues, a timesharing thread which calls yield() syscall should be >> moved to inactive queue. > > A question that might be related: We have sched_sizeof_proc(), etc. in= =20 > every scheduler, which returns a constant. Is it worthy to convert them = to=20 > constants that just expand inline during the kernel compile? It should make no difference -- sched_sizeof_proc() is evaluated exactly on= ce,=20 when the process zone is created. After that, the size is cached in the=20 process zone and never re-evaluated. The current model allows the size to = be=20 calculated based on data structures private to sched_foo.c, which has some= =20 nice implementation hiding advantages :-). Robert N M Watson Computer Laboratory Universty of Cambridge --0-1050479043-1150363799=:9158--