This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libitm: fixes and optimizations in gl_wt


The following patches don't depend on each other but are all for the
gl_wt TM method.

patch1:
For memory transfers from source regions with the read-for-write
modifier, undo logging of these regions was missing.  Also optimize the
number of accesses to gtm_thr().

patch2:
Similar to the ml_wt code, we don't need to use acq_rel but just acquire
memory order when acquiring the orec.  The following release fence is
still necessary.

patch3:
Recently, I changed how gtm_rwlock handles upgrades to serial mode.
This change was to fix privatization safety and basically consists of
not modifying gtm_thread::shared_state until trycommit() and/or
rollback() have finished after the upgrade (and before the switch to
serialirr dispatch).  With this in place, we can avoid the previous
workarounds for the commit-in-serial-mode corner case.

patch4:
Privatization safety in gl_wt rollback was previously enforced with
something that probably worked but for which the precise C++11 mem model
reasoning was unclear.  The patch fixes that (so it's clear why it works
on the basis of the language's memory model, not on the HW models), and
it less costly than the previously used seq_cst barrier.

patch5:
Just put gl_wt's global orec on a separate cacheline, same as we do in
ml_wt.


OK for trunk?

Attachment: patch1
Description: Text document

Attachment: patch2
Description: Text document

Attachment: patch3
Description: Text document

Attachment: patch4
Description: Text document

Attachment: patch5
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]