David Xu wrote: > Julian Elischer wrote: > >> >> I have made a first set of changes to allow threads to be 'forked' >> within the kernel. >> >> I have run on the resulting kernel for some of today with no problems >> other than >> some statistics oddness in top which I plan on looking at next week. >> >> The current patch doen't remove the ability to make kernel processes, >> however it does >> add the ability to make threads under process 0 and alters nearly all >> the users of >> kernel threads to actually do this.. The exception is the aio >> threads, as they seem to require >> separate address spaces to work with and that requires separate proc >> structures. >> >> I was thinking that they could act as extra threads on the calling >> processes but that >> is more of a rewrite than I plan right now. >> >> Anyhow the diffs so far are at: >> >> http://www.freebsd.org/~julian/kthread.diff. >> >> more later. >> >> julian > > > in vfs_aio.c, we have to borrow user process's vmspace, creating all > kthread in > proc0 breaks this. yes you should find that the newest patches revert this change. (if they do not then I have not uploaded the newest patches..) I just looked.... The newest patches are at http://people.freebsd.org/~julian/kthread.diff They retain the ability to make a kernel process as well as a kernel thread, and they use the process ability to make the process for aio. I found this on friday ;-) However the abiolity to make a thread shoudl ebused in the following manner.. an aio request shouild spawn a separate KSEGRP on teh calling process and make a separate thread that is actually owned by the requesting process. The calling process doesn't know about the new thread. It makes AIO extensible to as many processes as you want and if ther ei more work you can even make multiple working threads in the ksegrp (maybe one per filesystem ) just an idea. It's gotta be better than grafting a thread onto processes VMs on the fly. > > David Xu > > _______________________________________________ > freebsd-current_at_freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe_at_freebsd.org"Received on Mon Jan 23 2006 - 00:19:44 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:51 UTC