From: Robert E. <pa...@us...> - 2004-11-23 17:29:16
|
CVSROOT: /cvsroot/chromium Module name: cr Repository: cr/spu/tilesort/ Changes by: pa...@sc....(none) 04/11/23 09:29:07 Log message: Documented an architectural impurity for later investigation and resolution. Comments were added to crserverlib/server_stream.c (where the problem is rooted); comments and a code workaround were added to spu/tilesort/generator.py (to avoid the problem for now). The problem lies in how the crserver serializes streams. The differencing API is used with the crserver's head SPU's dispatch table to bring the crserver's master context into the correct state before dispatching a buffer of commands. The impurity is that, if the buffer of commands contains a MakeCurrent() command, the SPU's dispatch table functions may be called before the SPU has had an opportunity to do the MakeCurrent(). Sometimes this is harmless (if the SPU doesn't rely on any state set during its own MakeCurrent(), as is typically the case). But sometimes this can be disastrous (the current "tilesort" SPU, with DLM enhancements, requires that its context be correct before functions are called). Now, "tilesort" is not often used as a crserver SPU; it more typically appears as an application node SPU. In one test case (in the "multitilesort.conf" configuration), "tilesort" is used as a generalized distribution mechanism, where it receives commands from the application node, and rebroadcasts them to its child nodes. It is in this case that the problem arises; the crserver that has "tilesort" as its head SPU will, if the "tilesort" code doesn't apply a workaround, segment fault the first time the state differencing occurs (because the functions are being called before MakeCurrent() can set appropriate state). Once the architectural issue is identified and repaired, both of these files should be changed to match. For now, these changes should allow "multitilesort.conf" to run. Modified files: cr/crserverlib/: server_stream.c cr/spu/tilesort/: generator.py Revision Changes Path 1.20 +30 -0 cr/crserverlib/server_stream.c 1.3 +18 -1 cr/spu/tilesort/generator.py |