From owner-freebsd-current Mon Dec 24 16:59:34 2001 Delivered-To: freebsd-current@freebsd.org Received: from mta10.onebox.com (mta10.onebox.com [64.68.76.184]) by hub.freebsd.org (Postfix) with ESMTP id 8F82037B405 for ; Mon, 24 Dec 2001 16:59:22 -0800 (PST) Received: from onebox.com ([10.1.101.8]) by mta06.onebox.com (InterMail vM.4.01.03.23 201-229-121-123-20010418) with SMTP id <20011224142623.BCYP29423.mta06.onebox.com@onebox.com>; Mon, 24 Dec 2001 06:26:23 -0800 Received: from [165.121.193.38] by onebox.com with HTTP; Mon, 24 Dec 2001 06:26:23 -0800 Date: Mon, 24 Dec 2001 06:26:23 -0800 Subject: Re: KSE changes available From: "Glenn Gombert" To: Julian Elischer Cc: current@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Message-Id: <20011224142623.BCYP29423.mta06.onebox.com@onebox.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In case anyone is in interested I have put a patched set of source files from the latest changes below on my FreeBSD Web page at: freebsd.imatowns.com/kse3 There is the latest set of 'diffs' from the link below broken out for each individual file too, along with the 'unpatched' source files in three different directories: /unpatched-src /patches/ /patched-src I have not tried to compile these yet, just have got the soruces code patches finished :) Glenn G. ---- Julian Elischer wrote: > The latest round of KSE changes are available from > > http://www.freebsd.org/~julian/thediff > > These changes represent a work in progress. > Basically the state is: > > GENERIC compiles > (I don't know yet if it runs but I doubt it.) > The following changes have been made: > The 'thread' structure is no longer a built-in part of the proc structure. > There is an infrastructure to independently crfeate and reap threads. > The infrastructure is used to create and destroy the 'usual' single > thread > associated with each process. It should eventually be used to create > more > threads per process.. > The 'state' variable associated with the process has been raped and > > now each thread, and process and KSE has it's own state. > > This last part is the bit that is broken because a LOT of the kernel > doesn't expect the state of a thread to be spread across several > structures. > > For example: > switch (p->p_stat) { > case SRUN: > ... > case SSTOP: > .. > > has to be completely rewritten because > SRUN is a per-thread property > and is accessed as: > FOREACH_THREAD_IN_PROC(p, td) { > switch(td->td_state) { > case TDS_RUNNING: > case TDS_RUNQ: > case TDS_SLP: > ... > } > ... > } > > wheras STOP is still a per-process state. > > obviously any code that tries to assume the same scope for these tow > states will break violently in the new code. > > I have replaced some of the logic where there seems to be a simple > answer, > but there are plenty of places where the answer is not clear. > > Such places include signal delivery, > selection of process (thread?) to deliver a signal to, > collection of scheduling statistics, > handling FORK run by one of several threads, > handling EXIT run by one of several threads, > handling when the user types ^Z and suspends the process. > > If anyone is feeling adventurous they can stat with the code that is > there > and start fixing things :-) > send me patches but let me know ahead of time what you will be doing > so we don't duplicate, and so I can send you notes on where I'm going > in > that part.. > > I'll be working on the scheduler for the next few days I think. > > Note: if ((p->p_flag & P_KSES) == 0) a process should act exactly as > it > does now.. :-) > > REGARDS JULIAN > (bloody capslock key) > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > __________________________________________________ FREE voicemail, email, and fax...all in one place. Sign Up Now! http://www.onebox.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message