From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <35dbd2d8996bf96d65c969836bd2e172@terzarima.net> References: <35dbd2d8996bf96d65c969836bd2e172@terzarima.net> Date: Fri, 29 Oct 2010 01:51:23 +0200 Message-ID: From: Gorka Guardiola To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [9fans] A little more ado about async Tclunk Topicbox-Message-UUID: 70e758fc-ead6-11e9-9d60-3106f5b1d025 On Thu, Oct 28, 2010 at 10:18 PM, Charles Forsyth wrote: > > the race is that there's nothing to say that the clunk completes before the > process continues on to do something more, including some action that depends on the clunk completing, > such as simply repeating the open. that open can fail if the mode or the name > imposes particular constraints; constraints that depend on the order of events as > expressed by the process. What you are saying is that the problem could be something like: -> Tclunk (do not wait for response) -> Topen (the file is exclusive) Then somehow in the server, Tclunk and Topen are reordered because they are managed by different threads and Topen gets an error because the file is already opened. This is a problem, I agree. > On Oct 28, 2010, at 10:32 PM, Venkatesh Srinivas wrote: > On a decent server, since clunk cannot fail and won't launch the missiles, you can't really do anything that would depend on the result anyway. Tclunk may be a good time to commit to disk or do other unmissile like thing. You can switch to another cache after waiting for the Rclunk, for example. Decent or not indecent I am more and more conviced after this thread that Tclunk should be synchronous. Even in decent files Tclunk can have some side effects.