kernel stack

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
psnix
Member
Member
Posts: 50
Joined: Fri Oct 24, 2008 12:34 pm

kernel stack

Post by psnix »

hi

4kb is enough size for kernel stack?

is stack size fixed (for kernel)?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: kernel stack

Post by Combuster »

It all depends. Yes, a fixed 4k is enough for many. Yours truly uses 2K and doesn't use half of it. It is however not enough for the Linux kernel, it's not enough for whomever runs recursive algorithms in kernel space, and it's not enough for whomever stores large arrays on the stack.

Can you prove a constant upper bound on kernel stack usage? Chances are very likely your design has issues if you can't.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
OSwhatever
Member
Member
Posts: 595
Joined: Mon Jul 05, 2010 4:15 pm

Re: kernel stack

Post by OSwhatever »

4Kb is usually enough for most microkernels. Write a pattern into your kernel stack when it is created and you can investigate how much you really use.
Post Reply