From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds To: dbailey27@ameritech.net Cc: 9fans@cse.psu.edu, sionide@beefed.org, fa1th@beefed.org In-Reply-To: <0d7bea785d989cd275b7ca67cfa6cdeb@yourdomain.dom> Message-ID: References: <0d7bea785d989cd275b7ca67cfa6cdeb@yourdomain.dom> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [9fans] Re: Threads: Sewing badges of honor onto a Kernel Date: Thu, 26 Feb 2004 22:20:23 -0800 Topicbox-Message-UUID: fd4086d4-eacc-11e9-9e20-41e7f4b1d025 On Thu, 26 Feb 2004 dbailey27@ameritech.net wrote: > > This commentary from Linus Torvalds on rfork[2] proclaims that a single, unified > stack space for multiple threads is not only beneficial but imperative for proper > thread propagation. What we are wondering is ... why? (1) There are valid reasons to pass pointers between threads, and yes, they can be pointers to thread stack areas. (2) No existing common hardware can do "partial TLB flushes" efficiently. The main performance advantage of threads is that you don't need to flush the VM state on thread switches. If you have partial VM area sharing, you lose that whole point. (3) Implementation sucks. Irix and Plan-9 both get it wrong, and they _pay_ for it. Heavily. The Linux code is just better. Linus