-
- Downloads
bsd: set a smaller default stack for BSD threads.
All threads created through the bsd/porting/kthread interface are threads that used to be kernel threads in BSD, which means they are expected to use less stack. Although I have no idea what is the default stack size for BSD, in Linux things need as little as 4k. More importantly, they are threads whose memory usage are under our control, and we could fix heavy offenders without a problem. If we don't say anything, they will start with 64k which is way, way, too much. I am proposing here we go lower and get to 16k - which is even still quite conservative, but so am I. Measuring memory before and after the mount - because ZFS is currently our heaviest user, I can save around 7Mb with this patch. Passes make check (except for tst-kill, which is broken AFAICT) and misc-fs-stress. Reviewed-by:Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
Please register or sign in to comment