These are my current thoughts on intrinsics for the combined GC/Transaction stuff I want to do some day:
log (gc | tx), (r | w), %ptr
Perform a logging action for %ptr.
gc_alloc type, options
Allocate something from GC'ed memory.
safepoint
Possibly deschedule. Possibly switch to allocator. These must be placed by the compiler so that no more than some number of instructions get executed between each one.
tx_begin (open/closed)
Begin a new transaction, with closed or open nesting.
tx_validate (r | w) [ %ptr*]
Validate the given pointers, or the entire read/write set.
tx_discard %ptr*
Discard the given pointers from the read set.
tx_commit
Commit a transaction.
tx_abort [num]
Abort the num innermost transactions (or just the innermost).
tx_retry
Roll back, then suspend until someone touches the current read set, then continue.
This is the intrinsics, not what the compiler will end up using. The stuff actually coming from the TM runtime will be much more minimal, primarily contention management, suspend, and wakeup stuff in the end.
It should be noted that retries inside orelses are known to be evil. I have a paper about this...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment