Date: Fri, 19 Oct 2007 23:45:22 -0700 From: Julian Elischer <julian@elischer.org> To: FreeBSD Current <current@freebsd.org> Subject: kthread vs kproc Message-ID: <4719A402.9040708@elischer.org>
next in thread | raw e-mail | index | archive | help
after chatting with alc this afternoon I decided to revive a set of changes I have had sitting around for a time. Basically I change all teh kthread_xxx calls to kproc_xxx as they all act on processes, and then introduce a new interface set called kthread_xxx that actually do make threads. The first step is a wholesale renaming of the old code to 'kproc' with the following patch http://people.freebsd.org/~julian/kproc.diff the next step is to introduce the new thread creation code. (not-yet up to date version below) The last step is to convert as many of the kprocs as possible to be kthreads. some (for instance in the aio code I believe) need to remain separate processes. As Alan and I decided this evening, this has several advantages. 1/ threads have less overhead than processes 2/ creation of kprocs requires locks etc that are problematic in some situations while kthreads require a lot less, and can be done in a more light weight manner. if I'd had my witts about me I'd have done this before we branched 7 to catch any ABI incompatibilities.. oh well. here's the out of date replacement code: http://people.freebsd.org/~julian/kthread.diff I will be updating it...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4719A402.9040708>