Subject: Is there any way to change the kernel stack size?
To: None <email@example.com>
From: Alan Ritter <firstname.lastname@example.org>
Date: 08/25/2005 14:59:49
Hi, I'm finishing up porting the FreeBSD NDIS driver to NetBSD for the Summer of
Code, and trying to work out a few more bugs.
In FreeBSD's NDIS they use a larger stack size when calling some of the Windows
driver functions, as Windows has a larger kernel stack than FreeBSD. I think
FreeBSD's is 2 pages, but for NDIS they specify 8 to be safe when calling
kthread_create(). The NetBSD version, kthread_create1(), doesn't seem to have a
parameter that would allow me to specify the stack size, so I'm not sure what to do.
Anyway, I have a few specific questions that I would greatly appreciate answers to:
1. What is the default kernel stack size in NetBSD?
2. Where can I find the kernel stack? From reading the 4.4 BSD book I think it's
somewhere in the user structure (struct pcb in sys/arch/i386/include/pcb.h for
i386). But I haven't been able to find it.
3. Is there any way to change the stack size of a specific kernel thread, or does
it need to be fixed for all threads?
4. How to change it?