Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-06-14 16:17:59+02:00, tomas@stripped +5 -0
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-telco-gca
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-telco-6.1
MERGE: 1.2403.9.66
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp@stripped, 2007-06-14 16:17:55+02:00, tomas@stripped +0 -0
Auto merged
MERGE: 1.55.1.9
storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp@stripped, 2007-06-14 16:17:55+02:00, tomas@stripped +0 -0
Auto merged
MERGE: 1.19.1.4
storage/ndb/src/kernel/blocks/pgman.cpp@stripped, 2007-06-14 16:17:55+02:00, tomas@stripped +0 -0
Auto merged
MERGE: 1.20.1.5
storage/ndb/src/kernel/vm/SimulatedBlock.hpp@stripped, 2007-06-14 16:17:55+02:00, tomas@stripped +0 -0
Auto merged
MERGE: 1.28.1.4
storage/ndb/src/ndbapi/TransporterFacade.cpp@stripped, 2007-06-14 16:17:55+02:00, tomas@stripped +0 -0
Auto merged
MERGE: 1.57.1.2
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tomas
# Host: whalegate.ndb.mysql.com
# Root: /home/tomas/mysql-5.1-telco-6.1/RESYNC
--- 1.25/storage/ndb/src/kernel/blocks/pgman.cpp 2007-06-03 19:34:51 +02:00
+++ 1.26/storage/ndb/src/kernel/blocks/pgman.cpp 2007-06-14 16:17:55 +02:00
@@ -122,7 +122,7 @@
if (page_buffer > 0)
{
- page_buffer /= GLOBAL_PAGE_SIZE; // in pages
+ page_buffer = (page_buffer + GLOBAL_PAGE_SIZE - 1) / GLOBAL_PAGE_SIZE; // in pages
m_param.m_max_pages = page_buffer;
m_page_entry_pool.setSize(m_param.m_lirs_stack_mult * page_buffer);
m_param.m_max_hot_pages = (page_buffer * 9) / 10;
@@ -144,7 +144,7 @@
m_lirs_stack_mult(10),
m_max_hot_pages(56),
m_max_loop_count(256),
- m_max_io_waits(64),
+ m_max_io_waits(256),
m_stats_loop_delay(1000),
m_cleanup_loop_delay(200),
m_lcp_loop_delay(0)
--- 1.65/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2007-06-12 10:36:08 +02:00
+++ 1.66/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2007-06-14 16:17:55 +02:00
@@ -2620,6 +2620,9 @@
ArrayPool<Page> c_page_pool;
Uint32 cnoOfAllocatedPages;
Uint32 m_max_allocate_pages;
+
+ /* read ahead in pages during disk order scan */
+ Uint32 m_max_page_read_ahead;
Tablerec *tablerec;
Uint32 cnoOfTablerec;
--- 1.32/storage/ndb/src/kernel/vm/SimulatedBlock.hpp 2007-06-05 17:55:02 +02:00
+++ 1.33/storage/ndb/src/kernel/vm/SimulatedBlock.hpp 2007-06-14 16:17:55 +02:00
@@ -131,6 +131,8 @@
virtual const char* get_filename(Uint32 fd) const { return "";}
protected:
static Callback TheEmptyCallback;
+ void TheNULLCallbackFunction(class Signal*, Uint32, Uint32);
+ static Callback TheNULLCallback;
void execute(Signal* signal, Callback & c, Uint32 returnCode);
@@ -599,6 +601,8 @@
void
SimulatedBlock::execute(Signal* signal, Callback & c, Uint32 returnCode){
CallbackFunction fun = c.m_callbackFunction;
+ if (fun == TheNULLCallback.m_callbackFunction)
+ return;
ndbrequire(fun != 0);
c.m_callbackFunction = NULL;
(this->*fun)(signal, c.m_callbackData, returnCode);
--- 1.59/storage/ndb/src/ndbapi/TransporterFacade.cpp 2007-02-26 17:53:46 +01:00
+++ 1.60/storage/ndb/src/ndbapi/TransporterFacade.cpp 2007-06-14 16:17:55 +02:00
@@ -1403,9 +1403,6 @@
}
if (wait_time == -1)
{
-#ifdef VM_TRACE
- ndbout << "Waited WAITFOR_RESPONSE_TIMEOUT, continuing wait" << endl;
-#endif
continue;
}
wait_time= max_time - NdbTick_CurrentMillisecond();
--- 1.24/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp 2007-05-29 07:24:54 +02:00
+++ 1.25/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp 2007-06-14 16:17:55 +02:00
@@ -686,13 +686,74 @@
// move to next extent
jam();
pos.m_extent_info_ptr_i = ext_ptr.i;
- Extent_info* ext = c_extent_pool.getPtr(pos.m_extent_info_ptr_i);
+ ext = c_extent_pool.getPtr(pos.m_extent_info_ptr_i);
key.m_file_no = ext->m_key.m_file_no;
key.m_page_no = ext->m_first_page_no;
}
}
key.m_page_idx = 0;
pos.m_get = ScanPos::Get_page_dd;
+ /*
+ read ahead for scan in disk order
+ do read ahead every 8:th page
+ */
+ if ((bits & ScanOp::SCAN_DD) &&
+ (((key.m_page_no - ext->m_first_page_no) & 7) == 0))
+ {
+ jam();
+ // initialize PGMAN request
+ Page_cache_client::Request preq;
+ preq.m_page = pos.m_key;
+ preq.m_callback = TheNULLCallback;
+
+ // set maximum read ahead
+ Uint32 read_ahead = m_max_page_read_ahead;
+
+ while (true)
+ {
+ // prepare page read ahead in current extent
+ Uint32 page_no = preq.m_page.m_page_no;
+ Uint32 page_no_limit = page_no + read_ahead;
+ Uint32 limit = ext->m_first_page_no + alloc.m_extent_size;
+ if (page_no_limit > limit)
+ {
+ jam();
+ // read ahead crosses extent, set limit for this extent
+ read_ahead = page_no_limit - limit;
+ page_no_limit = limit;
+ // and make sure we only read one extra extent next time around
+ if (read_ahead > alloc.m_extent_size)
+ read_ahead = alloc.m_extent_size;
+ }
+ else
+ {
+ jam();
+ read_ahead = 0; // no more to read ahead after this
+ }
+ // do read ahead pages for this extent
+ while (page_no < page_no_limit)
+ {
+ // page request to PGMAN
+ jam();
+ preq.m_page.m_page_no = page_no;
+ int flags = 0;
+ // ignore result
+ m_pgman.get_page(signal, preq, flags);
+ jamEntry();
+ page_no++;
+ }
+ if (!read_ahead || !list.next(ext_ptr))
+ {
+ // no more extents after this or read ahead done
+ jam();
+ break;
+ }
+ // move to next extent and initialize PGMAN request accordingly
+ Extent_info* ext = c_extent_pool.getPtr(ext_ptr.i);
+ preq.m_page.m_file_no = ext->m_key.m_file_no;
+ preq.m_page.m_page_no = ext->m_first_page_no;
+ }
+ } // if ScanOp::SCAN_DD read ahead
}
/*FALLTHRU*/
case ScanPos::Get_page_dd:
@@ -725,6 +786,7 @@
safe_cast(&Dbtup::disk_page_tup_scan_callback);
int flags = 0;
int res = m_pgman.get_page(signal, preq, flags);
+ jamEntry();
if (res == 0) {
jam();
// request queued
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2557) | tomas | 14 Jun |