diff options
Diffstat (limited to 'sys/sys/smr.h')
-rw-r--r-- | sys/sys/smr.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/sys/smr.h b/sys/sys/smr.h index b2c2fad07fec..0bd3d5ac77b5 100644 --- a/sys/sys/smr.h +++ b/sys/sys/smr.h @@ -64,6 +64,7 @@ typedef struct smr_shared *smr_shared_t; struct smr { smr_seq_t c_seq; /* Current observed sequence. */ smr_shared_t c_shared; /* Shared SMR state. */ + int c_deferred; /* Deferred advance counter. */ }; /* @@ -146,6 +147,13 @@ smr_exit(smr_t smr) smr_seq_t smr_advance(smr_t smr); /* + * Advances the write sequence number only after N calls. Returns + * the correct goal for a wr_seq that has not yet occurred. Used to + * minimize shared cacheline invalidations for frequent writers. + */ +smr_seq_t smr_advance_deferred(smr_t smr, int limit); + +/* * Returns true if a goal sequence has been reached. If * wait is true this will busy loop until success. */ |