From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Fri, 11 Jun 2010 16:59:42 +0200." <4C124F5E.10104@bouyapop.org> References: <4C1242CD.5020202@bouyapop.org> <4C124F5E.10104@bouyapop.org> From: Bakul Shah Date: Fri, 11 Jun 2010 10:11:50 -0700 Message-Id: <20100611171151.2E04B5B8B@mail.bitblocks.com> Subject: Re: [9fans] 9vx, kproc and *double sleep* Topicbox-Message-UUID: 31a20fc0-ead6-11e9-9d60-3106f5b1d025 On Fri, 11 Jun 2010 16:59:42 +0200 Philippe Anel wrote: > Ooops I forgot to answer this : > > - does changing spl* to manipulation of a per-cpu lock solve the problem? > > sometimes preventing anything else from running on your mach is > > exactly what you want. > > > No ... I don't think so. I think the problem comes from the fact the > process is no longer exclusively tied to the current Mach when going > (back) to schedinit() ... hence the change I did. Were you able to verify your hypothesis by adding a bit of trapping code + assertion(s) in the original sources? At the point of double sleep one can check state to see if the expected preconditions are true. Alternatively one can check when the expected conditions become true, set a variable and test it where the double sleep print occurs. Then one can sort of walk back to the earliest point where things go wrong.