diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-03-05 11:45:28 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-03-05 16:21:31 +0200 |
commit | a4ab54d70f26f93944e56c8e4e731e1107fdfa6b (patch) | |
tree | 5da731b4d210c84a92f0ec62bc95a8870f528de9 /sql/procedure.cc | |
parent | 555f955a163040528b24b2a901140e43d7bc580f (diff) | |
download | mariadb-git-a4ab54d70f26f93944e56c8e4e731e1107fdfa6b.tar.gz |
MDEV-14425 Cleanup: Use std::atomic for some log_sys members
Some fields were protected by log_sys.mutex, which adds quite some
overhead for readers. Some readers were submitting dirty reads.
log_t::lsn: Declare private and atomic. Add wrappers get_lsn()
and set_lsn() that will use relaxed memory access. Many accesses
to log_sys.lsn are still protected by log_sys.mutex; we avoid the
mutex for some readers.
log_t::flushed_to_disk_lsn: Declare private and atomic, and move
to the same cache line with log_t::lsn.
log_t::buf_free: Declare as size_t, and move to the same cache line
with log_t::lsn.
log_t::check_flush_or_checkpoint_: Declare private and atomic,
and move to the same cache line with log_t::lsn.
log_get_lsn(): Define as an alias of log_sys.get_lsn().
log_get_lsn_nowait(), log_peek_lsn(): Remove.
log_get_flush_lsn(): Define as an alias of log_sys.get_flush_lsn().
log_t::initiate_write(): Replaces log_buffer_sync_in_background().
Diffstat (limited to 'sql/procedure.cc')
0 files changed, 0 insertions, 0 deletions