Re: About 4k kernel stack size....

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

 



linux-os \(Dick Johnson\) writes:
 > 

[...]

 > See, isn't rule-making fun? This whole 4k stack-
 > thing is really dumb. Other operating systems
 > use paged virtual memory for stacks, except
 > for the interrupt stack. If Linux used paged
 > virtual memory for stacks, 

... then spin-locks couldn't be held across function calls.

 >                            the pages would not
 > have to be contiguous so dynamic stack allocation
 > would practically never fail. But Linux doesn't
 > use paged virtual memory for stacks. So, there
 > needs to be some rule to control the amount
 > of kernel stack allocated to each task when it
 > executes a system call.
 > 
 > This means, in the limit, that there are two
 > possibilities:
 > 
 > (1)	Implement paged virtual memory for stack.

As an exercise: subscribe to NT kernel development mailing list, and see
the fun they have when page-in code trips over paged out kernel text
page. As a rule, even code cannot pageable without very involving and
fragile analysis. Not to say about stack.

Nikita.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux