Artifacts Associated With Ticket 731356ffffffffff
Ticket change [988899a7f9] (rid 110618) by nobody on 2003-05-02 14:03:05:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This patch largely eliminates the need to use the Win32 TLS functions, which have serious limitations on Windows 95 and NT 4.0. This patch does NOT modify the "AllocCache" related functions to not use Win32 TLS functions. However, it could be extended to do so.
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "49. Threading"
- title initialized to: "Win32 thread storage patch (non-TLS)..."
- type initialized to: "Patch"
Ticket change [d1848841b0] (rid 113366) by nobody on 2003-05-02 21:03:12:
- icomment:
File Added - 49359: tls2.zip
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [6bb519eff7] (rid 128371) by mistachkin on 2003-05-05 11:34:28:
- icomment:
File Deleted - 49359: File Added - 49534: tls4.zip Logged In: YES user_id=113501 Updated to optionally (via TCL_NO_TLS) remove calls to ALL win32 TLS functions, including in the AllocCache related functions. Several leaks fixed (from HEAD, not my previous patch).
- login: "mistachkin"
- mimetype: "text/plain"
- priority changed to: "7 High"
- title changed to: "Win32 non-TLS thread storage patch..."
- username: "mistachkin"
- icomment:
Ticket change [5cc13d960e] (rid 115360) by mistachkin on 2003-05-05 13:31:34:
- icomment:
File Deleted - 49534: File Added - 49541: tls5.zip Logged In: YES user_id=113501 A few minor changes pursuant to discussions with jyl.
- login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Add attachment "tls5.zip" [c8712e0908] (rid 122105) by mistachkin on 2003-05-05 13:31:34.
Ticket change [881d3fd163] (rid 131815) by kennykb on 2003-05-11 00:25:37:
- icomment:
Logged In: YES user_id=99768 This is starting to look good! Just a few comments before it gets committed: (1) I'd be a bit more comfortable if STORAGE_CACHE_SLOTS were a prime number. Consider that on at least one version of Windows, the thread ID is always a multiple of four; this means that the position in the cache will also be a multiple of four, giving us only 25 effective slots instead of 100. Could we perhaps make it 97 instead? Another point is that we might want to consider making it a variable instead of a constant. The advantage to this is that we could compile tcltest with a very, very small value (2 perhaps) and thus make sure of test coverage in the cache miss logic. (2) Several new Tcl* functions have been added. It's generally considered good practice to put them in tclInt.decls -- but opinions vary about the use of the internal stubs table, so I'll be willing to be convinced otherwise. (3) Several functions in the new code lack prologue comments. It would be nice if these could get written before committing. (4) The management scheme that we've arrived at for thread specific data is actually platform neutral. Given that we've already encountered one platform with an awkward hard limit on thread specific data blocks, I'd not be willing to lay long odds that there is no other. I wonder if we should move the platform-neutral TSD management logic to generic/tclThread.c instead of calling it Windows code. (5) What's the difference between TCL_NO_TLS and TCL_THREAD_ALLOC_NO_TLS? Do we need both flags? (Actually, I wonder, given how badly Windows does this, whether we need either, or whether we just want to use our own system exclusively.) Nice job - I'm tempted to say that we should just use it for ALL our TSD management, irrespective of platform. - login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [d9723cfa28] (rid 107614) by mistachkin on 2003-05-11 08:42:35:
- icomment:
Logged In: YES user_id=113501 Let me address your comments one by one: (1) I think you are totally right about this. It should be a variable that is defaulted to a prime number. (2) I believe they should go into tclInt.decls, it slipped my mind at the time. (3) The functions in question are most likely the alloc cache functions, which strangely never had any prologue comments. I believe I added one function to this set of functions and I figured "why comment?" if there were no other comments regarding these particular functions. All the other functions I added should have prologue comments. (4) I agree about this too. However, some work will need to be done to make this cross-platform. I have proposed to JeffH that we create a new file for this subsystem and call it "generic/tclThreadStorage.c". (5) The difference between these flags is very important, actually. The TCL_NO_TLS flag prevents TLS from being used for "high level" thread local storage operations (TclpThreadDataKeyInit/TclpThreadDataKeyGet/TclpThre adDataKeySet). The TCL_THREAD_ALLOC_NO_TLS forces the threaded memory allocator (which is MUCH more low level) to NOT use TLS. These flags should definitely stay separate. Did you notice that I made some changes to tclHash.c (the ability to use TclpSysAlloc/TclpSysFree instead of ckalloc/ckfree for the non-entry parts of the table that need to be dynamically allocated) and tcl.h (a new hash key type flag)? It is my hope that these changes will NOT require a TIP, because without them, the threaded memory allocator CANNOT use hash tables (due to circular dependency issues). In conclusion, I don't think this patch should be committed as is. I'm still working on some ideas and I think that we should make the "new" code cross- platform. Oh, and I think we should leave in support for the "legacy" thread local storage stuff that's in there now.
- login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Ticket change [b1e193718f] (rid 98235) by mistachkin on 2003-05-11 18:41:09:
- icomment:
Logged In: YES user_id=113501 I've made some progress on making this patch for "generic". However, I have a couple questions. I need a way to initialize/finalizing a mutex WITHOUT having ckalloc/ckfree being called. I still need InitializeCriticalSection/DeleteCriticalSection (or their Unix/Mac equivalents) to be called for the mutex. The threaded memory allocator currently uses TclpNewAllocMutex (a very puzzling function) and then never finalizes the mutex. The TclpNewAllocMutex is poorly documented and in the case of TCL_THREADS without USE_THREAD_ALLOC, unavailable. I feel there should be new platform specific functions added to the tcl{Unix|Win|Mac}Thrd.c files, such as TclpInitMutex/TclpDeleteMutex. For platforms that do not require these steps, the functions can be empty. - login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Ticket change [ed349e5230] (rid 103836) by mistachkin on 2003-05-11 19:07:52:
- assignee changed to: "mistachkin"
- icomment:
Logged In: YES user_id=113501 Once I get this patch completed, I would really like to benchmark and stress test it. I haven't been able to get tclBench to cooperate as of yet. Any help on this is appreciated.
- login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
Ticket change [8eb541b264] (rid 120160) by hobbs on 2003-05-11 23:51:36:
- icomment:
Logged In: YES user_id=72656 tclbench has a little support for threaded tests, but it may not be quite what you want. What isn't working?
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [838040913b] (rid 117391) by mistachkin on 2003-06-06 10:57:12:
- icomment:
Logged In: YES user_id=113501 Further research reveals this problem is much worse than I originally thought. Running even the most basic Tcl and/or Tk scripts requires a LOT of TLS indexes. JUST to start wish requires 26 TLS indexes. To start wish and then run a script appears to require at least 33 to 40 TLS indexes. The more subsystems of Tcl or Tk that are required, the more TLS indexes are required.
- login: "mistachkin"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- username: "mistachkin"
- icomment:
Ticket change [92533cf46a] (rid 120745) by dgp on 2003-08-26 01:30:59:
- icomment:
Logged In: YES user_id=80530 TIP 138 is Accepted. Is this the implementation patch?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [7e7475878b] (rid 97411) by mistachkin on 2003-08-26 05:16:27:
- icomment:
Logged In: YES user_id=113501 Not exactly. This patch includes more than just the TIP #138 changes. When I get back home, I will create a new patch for HEAD with just the TIP #138 changes.
- login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Ticket change [17a7fd6329] (rid 122535) by dkf on 2003-10-29 17:17:47:
- icomment:
Logged In: YES user_id=79902 This is your reminder call. I want to get as many Accepted TIPs as possible to be Final...
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Remind"
- username: "dkf"
- icomment:
Ticket change [1bf3e08637] (rid 123241) by mistachkin on 2003-11-11 15:13:42:
- icomment:
Logged In: YES user_id=113501 This is not the TIP #138 patch, although this does incorporate the changes talked about in TIP #138. I will create a pure TIP #138 patch as soon as possible, however, I will need help making the doc changes.
- login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Ticket change [c7a809df22] (rid 121969) by dkf on 2003-11-12 01:19:19:
- icomment:
Logged In: YES user_id=79902 I might be able to help with docs. No promises though. (When you attach the patch that is purely the TIP impl, please change the Group field to TIP Implementation. Thanks!)
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Add attachment "731356.patch" [319ac26b4c] (rid 93454) by dgp on 2003-11-15 04:15:01.
Ticket change [357e55a373] (rid 106944) by dgp on 2003-11-15 04:15:01:
- icomment:
File Added - 67528: 731356.patch Logged In: YES user_id=80530 new patch updated to current HEAD.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [7ac1b1b57e] (rid 90390) by dgp on 2003-11-15 04:21:50:
- icomment:
File Added - 67530: tip138.patch Logged In: YES user_id=80530 Smaller patch that just implements TIP 138 (?) someone please review/confirm.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [68a5801c0c] (rid 103104) by dgp on 2003-11-15 04:52:33:
- icomment:
File Deleted - 67530: File Added - 67533: tip138.patch Logged In: YES user_id=80530 Corrected TIP 138 patch for Unix.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [444581cfb0] (rid 116687) by dgp on 2003-11-15 05:28:00:
- assignee changed to: "dkf"
- icomment:
File Deleted - 67533: File Added - 67547: tip138.patch Logged In: YES user_id=80530 Updated TIP 138 patch includes documentation. Please review, correct, and when satisfied, apply to HEAD.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Add attachment "tip138.patch" [1be416d62f] (rid 123227) by dgp on 2003-11-15 05:28:00.
Ticket change [22ab111765] (rid 130793) by dkf on 2003-11-15 05:41:38:
- icomment:
Logged In: YES user_id=79902 Pretty good. Docs not quite there and we need something to force this code to be exercised in 'make test'.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [9f2d39443b] (rid 96590) by dkf on 2003-11-15 06:21:29:
- closedate changed to: "2003-11-14T23:21:29"
- closer changed to: "dkf"
- foundin changed to: "TIP Implementation"
- icomment:
Logged In: YES user_id=79902 Implemented.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"