
Fabrezio
Deep Core Mining Inc.
|
Posted - 2008.07.07 17:27:00 -
[1]
Originally by: CCP Lingorm OK some general points again.
Multiple Cores/multi threading can not solve all the problems.
Do you really want a multi-threaded combat engine? Your using a more complex setup than me and your hit/damage calculations take longer to perform, than mine on a simpler setup, but because of multi-threading mine are threaded out and complete first so my damage is applied to you first, even though when you damage calculations are completed it turns out I am dead .... not really the situation we want.
There are some things we can do about this using wait locks so that we gather up all the damage/hit calculations to be processed in a time slice, the process then waits for all the responses to come back and then continues to do the linear processing of all the results, so we spread out the processing load to multi-thread the bits that can be parallel processed. But this would have to be tested to the nth degree to make sure that the timeslice size is correct and multithreading and wait process works. And to be honest I would not like to start this with the combat engine .... something a bit less complex would be nicer and safer. Say the physics engine.
This is something we are looking into, but as you can understand it is not as easy as chucking in a couple of thread calls and recompiling.
I am hoping to have some nice news on this front soon (or getting the actual dev's involved in this work to write a blog).
A couple of things: 1) We are talking about fractions of a second faster, not minutes, hours or days. As long as both are applied it doesn't matter the order. Furthermore, the limiting factor would be the cycle of the weapon and not the complexity of the calculation (as one is 4 orders of magnitude longer).
2) This demonstrates a general ignorance about multi-threading and parallelizing in general, which is disappointing.
3) You can break the problem down and apply something similar to tomasulo's algorithm:
Algorithm
More importantly, the concept of a re-order buffer:
ROB
What does this all mean? You transformed the problem (there really isn't a problem, but if they want strict control over when damage is applied, this would do it) from something that requires locks up the wahzoo into a very simple producer / consumer model, which is well understood. Please do not remove moderator edits from your signature. It has been removed because it doesn't reflect your ingame persona. If you have comments or questions please email us at [email protected]. Thanks, Hango |