Commit ee12b8f4 authored by unknown's avatar unknown

Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-telco-gca

into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user


storage/ndb/src/kernel/blocks/pgman.cpp:
  Auto merged
parents e33600bc 18dc4457
......@@ -946,9 +946,11 @@ Pgman::process_map(Signal* signal)
#ifdef VM_TRACE
debugOut << "PGMAN: >process_map" << endl;
#endif
int max_count = m_param.m_max_io_waits - m_stats.m_current_io_waits;
if (max_count > 0)
int max_count = 0;
if (m_param.m_max_io_waits > m_stats.m_current_io_waits) {
max_count = m_param.m_max_io_waits - m_stats.m_current_io_waits;
max_count = max_count / 2 + 1;
}
Page_sublist& pl_map = *m_page_sublist[Page_entry::SL_MAP];
while (! pl_map.isEmpty() && --max_count >= 0)
......@@ -1100,15 +1102,10 @@ Pgman::process_cleanup(Signal* signal)
}
int max_loop_count = m_param.m_max_loop_count;
int max_count = m_param.m_max_io_waits - m_stats.m_current_io_waits;
if (max_count > 0)
{
int max_count = 0;
if (m_param.m_max_io_waits > m_stats.m_current_io_waits) {
max_count = m_param.m_max_io_waits - m_stats.m_current_io_waits;
max_count = max_count / 2 + 1;
/*
* Possibly add code here to avoid writing too rapidly. May be
* unnecessary since only cold pages are cleaned.
*/
}
Ptr<Page_entry> ptr = m_cleanup_ptr;
......@@ -1210,9 +1207,12 @@ bool
Pgman::process_lcp(Signal* signal)
{
Page_hashlist& pl_hash = m_page_hashlist;
int max_count = m_param.m_max_io_waits - m_stats.m_current_io_waits;
if (max_count > 0)
int max_count = 0;
if (m_param.m_max_io_waits > m_stats.m_current_io_waits) {
max_count = m_param.m_max_io_waits - m_stats.m_current_io_waits;
max_count = max_count / 2 + 1;
}
#ifdef VM_TRACE
debugOut
......
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