Date: Mon, 17 Jul 2000 16:50:02 -0400 (EDT) From: Zhihui Zhang <zzhang@cs.binghamton.edu> To: freebsd-hackers@freebsd.org Subject: KLD, kernel threads, zone allocator Message-ID: <Pine.SOL.4.21.0007171638430.14955-100000@sol.cs.binghamton.edu>
next in thread | raw e-mail | index | archive | help
I am writing a KLD that gives me kernel fault each time I run 'ps' command after 'make unload'. The KLD has a system call to create several kernel threads by calling kthread_create(). During unload, I set flags to each threads so that they will call exit1() upon wakeup (sleep on a timeout). Before the last thread calls exit1(), it wakeup the kld unload process so that make 'unload' can finish. Is there anything wrong or better solutions? I also use vm_zone to allocate some data structes within the KLD. When unloading, I can use zfree() to free them except the zone header that I can not free(some_zone, M_ZONE). This is because M_ZONE is defined as *static* in vm_zone.c I wonder if this will cause memory leak after several loading and unloading the KLD. Finally, I want to know how to save the panic screen without hand writing it down. Any info on debugging under db> after fault? Any help is appreciated. -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.4.21.0007171638430.14955-100000>