Date: Tue, 05 Apr 2011 18:16:01 -0700 From: Julian Elischer <julian@freebsd.org> To: FreeBSD Current <current@freebsd.org> Subject: kernel thread creation cleanup Message-ID: <4D9BBED1.3070402@freebsd.org>
next in thread | raw e-mail | index | archive | help
I was just looking in the thread creation code after most of a decade NOT looking at it.. boy we really need to go through there with a broom.. the cobwebs are getting thick. Like we always call the code to put an upcall, even though we don't have upcalls any more, and we always create an trap frame on the stack even when we are making kernel threads that don't need it, actually, come to think of it DOES fork even need it? (need to go look) and we go through the fork trampoline even when we are doing kthread creation and could just as well go directly to the final function directly. (All of the above on amd64).. May be slighly different on other hardware, though much of it is encoded in MI code so probably not. This came from looking to see if I could somehow munge the stack to convince kgdb to damn well stop at that point (still failed. if anyone has ideas... :-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D9BBED1.3070402>