3251 Vasil Dimov 2010-12-02
Use "rep; nop" in InnoDB if it is available and "pause" is not
modified:
storage/innobase/include/ut0ut.h
3250 Marko Mäkelbuffer in debug builds
ibuf_page(): Renamed to ibuf_page_low(). Add the parameters file, line
so that the latch diagnostics will be more meaningful.
In debug builds, add the parameter ibool x_latch. When x_latch=FALSE,
do not x-latch the page, but only buffer-fix it for reading the bit.
In UNIV_SYNC_DEBUG, display a message if an insert buffer bitmap page
was already latched. (The message should be displayed in those cases
where the code would have previously failed.)
ibuf_page(): A wrapper macro for ibuf_page_low(). Pass x_latch=TRUE.
ibuf_bitmap_page_get_bits(): Renamed to ibuf_bitmap_page_get_bits_low().
In UNIV_DEBUG, add the parameter latch_mode.
Remove the parameter mtr unless UNIV_DEBUG is defined.
ibuf_bitmap_page_get_bits(): A wrapper macro for
ibuf_bitmap_page_get_bits_low(). Pass latch_type=MTR_MEMO_PAGE_X_FIX.
buf_page_get_gen(): Use ibuf_page_low(x_latch=FALSE) in the debug assertion.
This avoids the possible deadlock.
modified:
storage/innobase/buf/buf0buf.c
storage/innobase/ibuf/ibuf0ibuf.c
storage/innobase/include/ibuf0ibuf.h
=== modified file 'storage/innobase/include/ut0ut.h'
--- a/storage/innobase/include/ut0ut.h revid:marko.makela@stripped
+++ b/storage/innobase/include/ut0ut.h revid:vasil.dimov@strippedom-20101202083645-ygu8o5txhkelmuph
@@ -61,6 +61,8 @@ typedef time_t ib_time_t;
Also asm volatile may trigger a memory barrier (spilling all registers
to memory). */
# define UT_RELAX_CPU() __asm__ __volatile__ ("pause")
+#elif defined(HAVE_FAKE_PAUSE_INSTRUCTION)
+# define UT_RELAX_CPU() __asm__ __volatile__ ("rep; nop")
#elif defined(HAVE_ATOMIC_BUILTINS)
# define UT_RELAX_CPU() do { \
volatile lint volatile_var; \
No bundle (reason: useless for push emails).| Thread |
|---|
| • bzr push into mysql-5.5-innodb branch (vasil.dimov:3250 to 3251) | vasil.dimov | 2 Dec |