~drizzle-trunk/drizzle/development

Viewing all changes in revision 1819.9.56.

  • Committer: Stewart Smith
  • Author(s): Marko Mäkelä
  • Date: 2010-11-19 04:18:11 UTC
  • mto: (2021.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1971.
  • Revision ID: stewart@flamingspork.com-20101119041811-ld6ac5584s6ov5et
Merge Revision revid:marko.makela@oracle.com-20100810102248-xrdjie2de4r9h3ed from MySQL InnoDB

Original revid:marko.makela@oracle.com-20100810102248-xrdjie2de4r9h3ed

Original Authors: Marko Mäkelä <marko.makela@oracle.com>
Original commit message:
Bug#54914: InnoDB: performance drop with innodb_change_buffering=all

Reduce ibuf_mutex and ibuf_pessimistic_insert_mutex contention further.

Protect ibuf->empty by the insert buffer root page latch, not ibuf_mutex.

ibuf_tree_root_get(): Assert that ibuf_mutex is owned by the
caller. Assert that the stamped page number is correct. Assert that
ibuf->empty agrees with the root page.

ibuf_size_update(): Do not update ibuf->empty.

ibuf_init_at_db_start(): Update ibuf->empty while holding the root page latch.

ibuf_add_free_page(): Return TRUE/FALSE instead of DB_SUCCESS/DB_STRONG_FAIL.

ibuf_remove_free_page(): Release ibuf_pessimistic_insert_mutex as
early as possible.

ibuf_contract_ext(): Rely on a dirty read of ibuf->empty, unless the
server is being shut down. Never acquire ibuf_mutex. Eliminate n_stored.

ibuf_contract_after_insert(): Never acquire ibuf_mutex. Perform dirty
reads of ibuf->size and ibuf->max_size.

ibuf_insert_low(): Only acquire ibuf_mutex for mode==BTR_MODIFY_TREE.
Perform dirty reads of ibuf->size and ibuf->max_size. Update
ibuf->empty while holding the root page latch.

ibuf_delete_rec(): Update ibuf->empty while holding the root page latch.

ibuf_is_empty(): Release ibuf_mutex earlier.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: