Commit cda25368 authored by inaam's avatar inaam

branches/zip rb://138 (REVERT)

Revert the flush neighbors patch as it shows regression in
the benchmarks run by Michael.
parent 69963776
...@@ -16,18 +16,6 @@ ...@@ -16,18 +16,6 @@
innodb_adaptive_flushing to control whether the new flushing innodb_adaptive_flushing to control whether the new flushing
algorithm should be used. algorithm should be used.
2009-07-07 The InnoDB Team
* buf/buf0flu.c:
Change the algorithm of flushing neighbors. The current
implementation is to try to flush the neighbors of every
page that we flush. This patch makes the following distinction:
1) If the flush is from flush_list, AND
2) If the flush is intended to move the oldest modification
LSN ahead
THEN, do not try to flush the neighbors. Just focus on flushing
dirty pages at the end of flush_list.
2009-07-07 The InnoDB Team 2009-07-07 The InnoDB Team
* srv/srv0srv.c, handler/ha_innodb.cc, log/log0log.c, * srv/srv0srv.c, handler/ha_innodb.cc, log/log0log.c,
......
...@@ -1012,7 +1012,6 @@ buf_flush_batch( ...@@ -1012,7 +1012,6 @@ buf_flush_batch(
ulint old_page_count; ulint old_page_count;
ulint space; ulint space;
ulint offset; ulint offset;
ibool try_neighbors = TRUE;
ut_ad((flush_type == BUF_FLUSH_LRU) ut_ad((flush_type == BUF_FLUSH_LRU)
|| (flush_type == BUF_FLUSH_LIST)); || (flush_type == BUF_FLUSH_LIST));
...@@ -1020,17 +1019,6 @@ buf_flush_batch( ...@@ -1020,17 +1019,6 @@ buf_flush_batch(
ut_ad((flush_type != BUF_FLUSH_LIST) ut_ad((flush_type != BUF_FLUSH_LIST)
|| sync_thread_levels_empty_gen(TRUE)); || sync_thread_levels_empty_gen(TRUE));
#endif /* UNIV_SYNC_DEBUG */ #endif /* UNIV_SYNC_DEBUG */
/* If we are being asked to do a BUF_FLUSH_LIST flush and
min_n is ULINT_MAX and lsn_limit is provided then we are doing
this flush from within a query thread i.e.: not in background
and therefore we should not try to flush the neighbors and just
focus on getting the flushed LSN to the lsn_limit. */
if (flush_type == BUF_FLUSH_LIST && min_n == ULINT_MAX
&& lsn_limit != IB_ULONGLONG_MAX) {
try_neighbors = FALSE;
}
buf_pool_mutex_enter(); buf_pool_mutex_enter();
if ((buf_pool->n_flush[flush_type] > 0) if ((buf_pool->n_flush[flush_type] > 0)
...@@ -1090,37 +1078,19 @@ flush_next: ...@@ -1090,37 +1078,19 @@ flush_next:
if (ready) { if (ready) {
space = buf_page_get_space(bpage); space = buf_page_get_space(bpage);
offset = buf_page_get_page_no(bpage); offset = buf_page_get_page_no(bpage);
old_page_count = page_count;
if (try_neighbors) {
buf_pool_mutex_exit(); buf_pool_mutex_exit();
/* Try to flush also all the old_page_count = page_count;
neighbors */
/* Try to flush also all the neighbors */
page_count += buf_flush_try_neighbors( page_count += buf_flush_try_neighbors(
space, offset, flush_type); space, offset, flush_type);
/* fprintf(stderr, /* fprintf(stderr,
"Flush type %lu, page no %lu," "Flush type %lu, page no %lu, neighb %lu\n",
" neighb %lu\n",
flush_type, offset, flush_type, offset,
page_count - old_page_count); */ page_count - old_page_count); */
} else {
/* Just flush this page. */
mutex_enter(block_mutex);
ut_a(buf_page_in_file(bpage));
ut_ad(bpage->in_page_hash);
/* buf_pool and block mutexes are
released inside the following
function. */
buf_flush_page(bpage, flush_type);
++page_count;
}
buf_pool_mutex_enter(); buf_pool_mutex_enter();
goto flush_next; goto flush_next;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment