Re: 4kb for kernel stack - what is that?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13-04-08 18:12, Peter Teoh wrote:

In "kernel hacking" when u do "make menuconfig", there is a 4kb for
stack stack thing - what is that?   I have that compiled and the
current kernel is running with that enabled.

Not even going to go into your test since only $DEITY knows what you have overwritten but I suggest you sync and hit reset fast since it really does mean that you have just a 4KB kernel stack available to you (*).

The old/normal thing on x86-32 is to have an 8KB kernel stack, consisting of two physically adjacent 4K pages (**). Since there might not be all that many of those pairs left after the system has been up and running for some time, 4KB kernel stacks make it easier on the VM.

(*) Per thread and a bit less in fact, since the current thread's thread_struct lives at the bottom. The option furthermore also means you get seperate interrupt stacks (also meaning that depending on usage you might even end with more generally available stack with the 4KSTACK option then without, when interrupt handlers share the stack).

(**) Physically just due to them residing in lowmem where virtually contigous means physically contigious. With the exception of DMAing from/to the stack (highly discouraged, ofcourse) a vmalloc'ed stack would do and if I'm not mistaken I heard sometime ago the kernel can now do that when in a low memory situation.

Rene.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux