From mboxrd@z Thu Jan 1 00:00:00 1970 From: jmk@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] Performance MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20010510172143.06C70199F9@mail.cse.psu.edu> Date: Thu, 10 May 2001 13:21:40 -0400 Topicbox-Message-UUID: 9e0c23d8-eac9-11e9-9e20-41e7f4b1d025 On Thu May 10 11:31:55 EDT 2001, DAGwyn@null.net wrote: > Richard Miller wrote: > > Isn't there a race condition here even on a uniprocessor? The scan > > of the run queue and call to HLT are done with interrupts enabled: > > Yes, the canonical solution, which addresses HLT on MP systems > as well, is that whatever modifies the run queue always as a side > effect wakes up all the dispatchers. Some platforms support use > of a software interrupt just as though it were a hardware > interrupt; on others a kludge would be required, or else just > leave it up to the clock interrupt. Waking up other processors would require interprocessor interrupts and that way lies madness. A software interrupt on a uniprocessor wouldn't fix the race. I think the correct kludge is to wait for the clock interrupt.