Date: Thu, 15 Jun 2006 10:29:59 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Xin LI <delphij@delphij.net> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, David Xu <davidxu@FreeBSD.org>, 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 Message-ID: <20060615102900.C9158@fledge.watson.org> In-Reply-To: <1150363262.937.44.camel@spirit> References: <200606150637.k5F6bdax000157@repoman.freebsd.org> <1150363262.937.44.camel@spirit>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 15 Jun 2006, Xin LI wrote: > ˙˙ 2006-06-15˙˙˙˙ 06:37 +0000˙˙David Xu˙˙˙˙˙˙ >> 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 > every scheduler, which returns a constant. Is it worthy to convert them to > constants that just expand inline during the kernel compile? It should make no difference -- sched_sizeof_proc() is evaluated exactly once, when the process zone is created. After that, the size is cached in the process zone and never re-evaluated. The current model allows the size to be calculated based on data structures private to sched_foo.c, which has some nice implementation hiding advantages :-). Robert N M Watson Computer Laboratory Universty of Cambridge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060615102900.C9158>
