Date: Thu, 17 Apr 2003 13:19:38 -0400 (EDT) From: Jeff Roberson <jroberson@chesapeake.net> To: Terry Lambert <tlambert2@mindspring.com> Cc: freebsd-threads@freebsd.org Subject: Re: Patches for threads/scheduler abstraction. Message-ID: <20030417131733.D76635-100000@mail.chesapeake.net> In-Reply-To: <3E9ED311.1BC9610D@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Terry, you're frustrating me. So many of these comments are off the mark that I'm not going to address them. You continue to demonstrate that you don't know what you're talking about and yet you feel the need to tell me how it is. I know you're smart enough to get it but right now you're not getting it. Please, go write some code. On Thu, 17 Apr 2003, Terry Lambert wrote: > Jeff Roberson wrote: > > On Wed, 16 Apr 2003, Julian Elischer wrote: > > > For a start the simple one would be queueing threads on the run queues. > > > A system compiled with that scheduelr would have no KSEs anywhere > > > in the entire kernel. > > > The kse one would be queueing KSEs. I don't see how you can do this > > > with a shared file. > > > > You're missing the point. The scheduler shouldn't be tied to the > > threading implementation. > > I think you will lose CPU affinity and negaffinity, if you do this. > > I agree that the scheduler shouldn't know about threads, but it > has to know about scheduling entities, given that it's, well, a > scheduler, after all. > > Right now, there are too many locks taken in the scheduler path, > as it is, and I don't see how concurrency will be improved by > doing what you suggest. > > There is also no clustering support -- for migration of a process > from one node to another -- something that can't be done with a > scheduler that snoops shared memory, since the memory in question > isn't shared. > > > This way you will not duplicate code and you will keep the two tasks > > independant. Essentially the sched_*.c files decide system scope > > contention while the threading implementation determines the process scope > > contention which may include some concurrency limits imposed by KSE or > > some other structure. > > > > Do you see? This way we could get KSEs out of the entire kernel other > > than kern_kse.c and still support them with the sched_4bsd and sched_ule > > scheduler. Otherwise we're going to have a copy of each scheduler for > > each threading implementation and we wont be able to support two threading > > implementations simultaneously. > > I think this is premature optimization; you're complaining about > a multiplicy problem, but the most glaringly obvious multiplicy > problem in the scheduling context is the fact that the 4BSD and > ULE schedulers can't coexist in the same kernel. I know ULE is > your baby, but what is needed is a cleaner abstraction than you > are currently suggesting. > > I think if you go forward with a half-abstraction, which is going > to end up setting in concrete the non-coexistance of schedulers, > that it would be just as big a mistake as not doing the part that > you are talking about. > > If you want to rename the terminology, you should go ahead and > rename it. Mach calls the container abstraction for a process > for a scheduler a "task". If you want to call it that instead > of "KSE" (or "KSEGRP", which I personally don't like), then go > ahead -- BUT there needs to be some type of container, and it > needs to be common to all scheduler implementations, or a given > implementation won't be able to provide CPU affinity and negaffinity > for all the objects in the container class. > > > > > Anyhow, the following hack (totaly unoptimised.... notice the > > > > I think this describes the whole project so far. > > 8-) 8-). > > -- Terry >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030417131733.D76635-100000>