From owner-cvs-all@FreeBSD.ORG Thu Jun 15 09:33:12 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from [127.0.0.1] (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id E5B8616A47F; Thu, 15 Jun 2006 09:33:10 +0000 (UTC) (envelope-from davidxu@freebsd.org) Message-ID: <44912955.3000307@freebsd.org> Date: Thu, 15 Jun 2006 17:33:09 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060519 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Xin LI References: <200606150637.k5F6bdax000157@repoman.freebsd.org> <1150363262.937.44.camel@spirit> In-Reply-To: <1150363262.937.44.camel@spirit> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: cvs-src@FreeBSD.org, src-committers@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 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2006 09:33:12 -0000 Xin LI wrote: > Hi, David, > > 在 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? > > Cheers, If you think this is right, we don't need td_kse either, we could include a scheduler header file by proc.h, and all scheduler data can be embedded into thread structure, this will eliminate many indirect pointer references in scheduler code, but some people are already working on kernel code cleanup, I won't touch this, this may happen in future though. Regards,