From owner-freebsd-threads@FreeBSD.ORG Wed Apr 16 19:18:22 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C97737B401 for ; Wed, 16 Apr 2003 19:18:22 -0700 (PDT) Received: from mail.chesapeake.net (chesapeake.net [205.130.220.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6627543FAF for ; Wed, 16 Apr 2003 19:18:21 -0700 (PDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id h3H2II991070; Wed, 16 Apr 2003 22:18:18 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Wed, 16 Apr 2003 22:18:17 -0400 (EDT) From: Jeff Roberson To: Julian Elischer In-Reply-To: Message-ID: <20030416221535.B76635-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: Patches for threads/scheduler abstraction. X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 02:18:22 -0000 On Wed, 16 Apr 2003, Julian Elischer wrote: > > OK I will send them shortly. > > These patches are NOT CLEAN > by which I mean I have not done any tidying up yet. > > It is still in the "cat dragged this over the fence" state. > However it does compile cleanly with only four files knowing what a kse > is (Not counting ULE, I have not touched ULE yet) (and I would actualy > rather that you did.. you understand it better). > > !!!!!!I have not tried to RUN this yet!!!!!! > The files that know what a kse is are: > ref3# grep ksevar.h kern/* > kern/kern_switch.c:#include > kern/kern_thread.c:#include > kern/sched_4bsd.c:#include > kern/sched_4bsd_kse.c:#include > (note that kern_thr.c is not one of them) > > My plan is: > eventually, sched_4bsd.c will only do the original BSD > scheduling (except with threads instead of procsses) > i.e. unfair, but simple and easy to benchmark on non-threaded apps. > (or on threaded apps with no competing processes) > > sched_4bsd_kse.c will suck in the current contents of kern_switch.c > and the KSE'd version of sched_4bsd.c. > > this will act like the current 4bsd scheduler WITH KSEs > There is a better way to do this. If you would listen to my tiered approach you could end up with one copy of sched_4bsd and not two. The kse specific logic could just sit in kern_kse which would not tell sched_4bsd about threads until they owned the KSE. We could even do this without the kse structure as a go between. > switch.c will go away (unless you want it as part of ULE). > > kern_thread.c will forget all about KSEs > (but its not there yet). > > I'll send the patches in an hour or so.. > My wife's calling :-/ > > > > > > > > > > > > > > Julian > > > > > > > > > > >