[MDEV-14304] Unnecessary conditions in buf_page_get_gen() Created: 2017-11-07  Updated: 2017-11-07  Resolved: 2017-11-07

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2.3, 10.3.0
Fix Version/s: 10.2.11, 10.3.3

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: performance

Issue Links:
Relates
relates to MDEV-10813 Clean-up InnoDB atomics, memory barri... Closed

 Description   

Ever since MDEV-10813 cleaned up InnoDB use of atomic memory operations, some conditions around buf_block_fix() have been unnecessary.

Because buf_block_fix() is an atomic operation, there is no need to protect it with an additional mutex, like buf_page_get_gen() did when fsp_is_system_temporary() held.

UNIV_INLINE
ulint
buf_block_fix(
	buf_page_t*	bpage)
{
	return(my_atomic_add32((int32*) &bpage->buf_fix_count, 1) + 1);
}

We shall remove the unnecessary bloat in buf_page_get_gen(). It might slightly improve performance in any operations that access the InnoDB buffer pool, and improve performance a little more on InnoDB temporary tables.


Generated at Thu Feb 08 08:12:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.