On 3/6/2017 3:15 PM, Jim wrote:
I've used TBEGIN and vaguely remember reading up on TBEGINC but never ever tried it .. I'll have to hit the foils again ..
My recommendation is that whenever possible, use a constrained transaction (aka, TBEGINC). It is guaranteed to complete successfully, where-as an unconstrained transaction is not and a fall-back serialization scheme and code must exist for the unconstrained transaction. In a performance path I recommend writing your logic to require as few registers as possible be saved at the start of the transaction. I have written constrained transactions that can be retried without saving, and thus restoring on transaction retry, any registers, so it can be done.
Always use the finest granularity serialization that will do what you want. Compare-and-swap or another interlocked access instruction should always be preferred over using transactional execution. Transactional execution should always be preferred over Perform-locked-operation. The great thing is that you can safely intermix interlocked and transactional execution instructions however you wish (which is *not* true for PLO).
Regards, Greg ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
