News for hackers. Stuff that matters.
Re:Why you can have millions of goroutines but only thousand... by timClicks on Monday October 08, 2018 @07:02PM (#18172070)
But wouldn't the consequence of spawning millions of native threads be to spill those virtual addresses into many, many pages and incur many more TLB misses and page faults generally?
Re:Why you can have millions of goroutines but only thousand... by nostrademons on Monday October 08, 2018 @07:45PM (#18172258)
Only the portions of the stack that are actually touched trigger a TLB miss and page fault. If you've got a million threads but each only touches the first 4K of stack space, you end up only touching 4G of RAM even though you've mapped 1T of it.
Re:Why you can have millions of goroutines but only thousand... by cryptonector on Tuesday October 09, 2018 @01:14AM (#18173493)
When you have terabytes of RAM you want large pages anyways.
Re:Why you can have millions of goroutines but only thousand... by gpderetta on Tuesday October 09, 2018 @03:40AM (#18174006)
As each stack will need to use [1] at least one page of physical memory, large pages are not great for stacks as they will normally waste memory.

[1] for classic contiguous stacks of course. That doesn't apply for separately allocated frames or segmented stacks.