Thanks for your response, but I'm sorry the book does not answer the question.. What I'm talking about is, I'm was under the impression that the kernel stack was just like any other memory allocated internally in kernel space, and that it was virtual and had to go through the Paging unit to translate to a physical address? Also if you take the kernel code itself, the EIP register (for example in x86) contains a virtual address which is translated to physical, before it is executed correct? Then why not the ESP? I hope I've not gone terribly wrong somewhere :) So reiterating my question, why did the stack have to be physically contiguous if ESP contained virtual addresses and not physical? Thanks, -Joel On Sat, Dec 12, 2009 at 5:02 PM, qieban qieban <qieban@xxxxxxxxx> wrote: > Hi,Joel: > > There is an explaination about the stack pages from two pages to one page in > 2.6 kernel > in Robert Love's book <<Linux Kernel Development >>(2nd Edition). > > Before kernel 2.6,the process kernel stack and interrupt handler share the > common stack. > so there is two pages for process kernel stack.and the pages in kernel mode > is physical memory,not virtual. > so the two pages must be physically continuous. > Well,as you know.as system runs.it is harder for kernel to allocate two > continuous pages than one page. > so 2.6 kernel use one page for process kernel stack instead. > and there is a one page stack for interrupt handler for each processor on > SMP. > > may this will help you:) > On Sat, Dec 12, 2009 at 5:48 PM, Joel Fernandes <agnel.joel@xxxxxxxxx> > wrote: >> >> There was a requirement in older kernels that the stack (which was >> then 2 pages and is now 1 page in newer kernels) had to be physically >> adjacent. >> Why was there such a requirement? wouldn't it have sufficed for the >> kernel stack to be contiguous in virtual memory? >> >> Thanks, >> -Joel >> >> -- >> To unsubscribe from this list: send an email with >> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx >> Please read the FAQ at http://kernelnewbies.org/FAQ >> > > -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ