From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds To: Dave Lukes Cc: 9fans <9fans@cse.psu.edu> Subject: Re: [9fans] Re: Threads: Sewing badges of honor onto a Kernel In-Reply-To: <1077904228.21772.252.camel@zevon> Message-ID: References: <290c102a9496a5f2a33af7922d24382e@yourdomain.dom> <1077884597.21772.21.camel@zevon> <1077899988.21772.196.camel@zevon> <1077904228.21772.252.camel@zevon> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Fri, 27 Feb 2004 10:26:09 -0800 Topicbox-Message-UUID: 0079077c-eacd-11e9-9e20-41e7f4b1d025 On Fri, 27 Feb 2004, Dave Lukes wrote: > > I'm not the one who wants to put 200Mb on the stack (see below): > who's crazy, again? Neither am I. I'm saying that you CANNOT "message pass" a hash table. You pass its address, and that has NOTHING to do with message passing. You use a function call that passes the address to a data structure around. > > Because message passing is idiotic, when the real hardware just passes > > pointers around? > > Ohh, yea, and pointers scale really well to NUMAs, right? Hey, when did you last write an operating system that worked on NUMA machines? Trust me. Passing pointers around scales a _hell_ of a lot better than copying data around as messages. > > Hint: you can't message-pass a hash table that describes 200 megabytes > > worth of filesystem names. > > No shit, Sherlock! Thanks for the enlightenment! > Next question: are you _seriously_ suggesting having 200Mb on a stack? No. I'm suggesting passing the pointer around, and not messing with messages at all. You're the one who complained about me using pointers: "your examples all use shared memory as a cheap substitute for message passing: why?" and I'm telling you that pointers are NOT a "cheap substitute for message passing". Pointers are fundamentally MORE POWERFUL than message passing is, and anybody who calls them a "cheap substitute" is a moron. That was my point: a pointer can point to hundreds of megabytes of complex data structures with lots of interdependencies and interesting locking rules. THAT is the real world. A message it is NOT. A message is a way to pass data by value. It has its place too, of course, especially in networks, but comparing it to a pointer is just misguided. Th eonly people who confuse pointers and messages are the microkernel people who noticed that real messages are too expensive to use, so they started calling pointers "messages", and play other semantic games. Linus