Commit 63bcc4a3 authored by marko's avatar marko

branches/zip: Remove innodb.patch.

This patch tries to enable resizeable buffer pool by polling the configuration
parameter for the buffer pool size, which is not a good solution.  The
right way could be to have an update function callback of a settable
MySQL variable to send an event to the master thread.

It could also make sense to expose the buffer pool chunks to the user.
The first chunk would never be freed.  Other chunks than the first one
would only be used for allocating page frames (uncompressed or compressed)
and block descriptors of of compressed pages (buf_page_t).  That is, other
users of the buffer pool, such as mem_heap_create_block() and the lock
table, would be restricted to the first chunk.  This would allow other
chunks to be freed by simply flushing any dirty blocks that they contain.

It might also be worthwhile to create multiple chunks initially, based on
the initial buffer pool size and the HugeTLB page size.  In that way, the
buffer pool could be reduced from the initial configuration at runtime.
parent 15c67098
Index: srv/srv0srv.c
===================================================================
--- srv/srv0srv.c (revision 1010)
+++ srv/srv0srv.c (working copy)
@@ -2183,6 +2182,12 @@ loop:
/* ---- When there is database activity by users, we cycle in this
loop */
+ if (UNIV_UNLIKELY(srv_buf_pool_size != srv_buf_pool_old_size)) {
+ srv_main_thread_op_info = "resizing buffer pool";
+
+ buf_pool_resize();
+ }
+
srv_main_thread_op_info = "reserving kernel mutex";
n_ios_very_old = log_sys->n_log_ios + buf_pool->n_pages_read
@@ -2543,6 +2548,12 @@ flush_loop:
master thread to wait for more server activity */
suspend_thread:
+ if (UNIV_UNLIKELY(srv_buf_pool_size != srv_buf_pool_old_size)) {
+ srv_main_thread_op_info = "resizing buffer pool";
+
+ buf_pool_resize();
+ }
+
srv_main_thread_op_info = "suspending";
mutex_enter(&kernel_mutex);
@@ -2553,7 +2564,9 @@ suspend_thread:
goto loop;
}
+#if 0
event = srv_suspend_thread();
+#endif
mutex_exit(&kernel_mutex);
@@ -2563,7 +2576,11 @@ suspend_thread:
manual also mentions this string in several places. */
srv_main_thread_op_info = "waiting for server activity";
+#if 0
os_event_wait(event);
+#else
+ os_thread_sleep(1000000);
+#endif
if (srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS) {
/* This is only extra safety, the thread should exit
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