]> git.pld-linux.org Git - packages/percona-server.git/blobdiff - innodb_io_patches.patch
- up to 5.5.11
[packages/percona-server.git] / innodb_io_patches.patch
index 0fc40795d3233f63b3cc67c08b636e4d3614ed41..0315e344e4efc5d499f5ebea495d90d981a32f24 100644 (file)
@@ -94,19 +94,16 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        srv_force_recovery = (ulint) innobase_force_recovery;
  
        srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
-@@ -10992,9 +11012,9 @@
- static MYSQL_SYSVAR_ULONG(purge_threads, srv_n_purge_threads,
+@@ -11001,7 +11021,7 @@
    PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
--  "Purge threads can be either 0 or 1. Default is 0.",
-+  "Purge threads can be either 0 or 1. Default is 1.",
+   "Purge threads can be either 0 or 1.",
    NULL, NULL,
 -  0,                  /* Default setting */
 +  1,                  /* Default setting */
    0,                  /* Minimum value */
    1, 0);              /* Maximum value */
  
-@@ -11036,12 +11056,18 @@
+@@ -11043,12 +11063,18 @@
    innodb_file_format_max_validate,
    innodb_file_format_max_update, "Antelope");
  
@@ -131,7 +128,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
  static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method,
    PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
-@@ -11136,7 +11162,7 @@
+@@ -11143,7 +11169,7 @@
  static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size,
    PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
    "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
@@ -140,7 +137,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
  static MYSQL_SYSVAR_LONG(buffer_pool_instances, innobase_buffer_pool_instances,
    PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
-@@ -11288,6 +11314,95 @@
+@@ -11295,6 +11321,95 @@
    "trigger a readahead.",
    NULL, NULL, 56, 0, 64, 0);
  
@@ -236,7 +233,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static struct st_mysql_sys_var* innobase_system_variables[]= {
    MYSQL_SYSVAR(additional_mem_pool_size),
    MYSQL_SYSVAR(autoextend_increment),
-@@ -11308,6 +11423,7 @@
+@@ -11315,6 +11430,7 @@
    MYSQL_SYSVAR(file_format_check),
    MYSQL_SYSVAR(file_format_max),
    MYSQL_SYSVAR(flush_log_at_trx_commit),
@@ -244,7 +241,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    MYSQL_SYSVAR(flush_method),
    MYSQL_SYSVAR(force_recovery),
    MYSQL_SYSVAR(locks_unsafe_for_binlog),
-@@ -11345,6 +11461,13 @@
+@@ -11352,6 +11468,13 @@
    MYSQL_SYSVAR(show_verbose_locks),
    MYSQL_SYSVAR(show_locks_held),
    MYSQL_SYSVAR(version),
@@ -345,7 +342,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
  /*-------------------------------------------*/
  
  extern ulint  srv_n_rows_inserted;
-@@ -394,8 +405,9 @@
+@@ -397,8 +408,9 @@
                                when writing data files, but do flush
                                after writing to log files */
        SRV_UNIX_NOSYNC,        /*!< do not flush after writing */
@@ -553,7 +550,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
  /* Try to flush dirty pages so as to avoid IO bursts at
  the checkpoints. */
-@@ -406,6 +407,17 @@
+@@ -409,6 +410,17 @@
  
  UNIV_INTERN ulong     srv_replication_delay           = 0;
  
@@ -571,7 +568,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  /*-------------------------------------------*/
  UNIV_INTERN ulong     srv_n_spin_wait_rounds  = 30;
  UNIV_INTERN ulong     srv_n_free_tickets_to_enter = 500;
-@@ -2742,6 +2754,7 @@
+@@ -2745,6 +2757,7 @@
        ulint           n_pages_purged  = 0;
        ulint           n_bytes_merged;
        ulint           n_pages_flushed;
@@ -579,7 +576,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
        ulint           n_bytes_archived;
        ulint           n_tables_to_drop;
        ulint           n_ios;
-@@ -2749,7 +2762,20 @@
+@@ -2752,7 +2765,20 @@
        ulint           n_ios_very_old;
        ulint           n_pend_ios;
        ulint           next_itr_time;
@@ -600,7 +597,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
  #ifdef UNIV_DEBUG_THREAD_CREATION
        fprintf(stderr, "Master thread starts, id %lu\n",
-@@ -2771,6 +2797,9 @@
+@@ -2774,6 +2800,9 @@
  
        mutex_exit(&kernel_mutex);
  
@@ -610,7 +607,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  loop:
        /*****************************************************************/
        /* ---- When there is database activity by users, we cycle in this
-@@ -2801,9 +2830,13 @@
+@@ -2804,9 +2833,13 @@
        /* Sleep for 1 second on entrying the for loop below the first time. */
        next_itr_time = ut_time_ms() + 1000;
  
@@ -624,7 +621,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
                /* ALTER TABLE in MySQL requires on Unix that the table handler
                can drop tables lazily after there no longer are SELECT
                queries to them. */
-@@ -2827,6 +2860,7 @@
+@@ -2830,6 +2863,7 @@
                srv_main_thread_op_info = "sleeping";
                srv_main_1_second_loops++;
  
@@ -632,7 +629,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
                if (next_itr_time > cur_time
                    && srv_shutdown_state == SRV_SHUTDOWN_NONE) {
  
-@@ -2837,10 +2871,26 @@
+@@ -2840,10 +2874,26 @@
                                        (next_itr_time - cur_time)
                                         * 1000));
                        srv_main_sleeps++;
@@ -659,7 +656,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
                /* Flush logs if needed */
                srv_sync_log_buffer_in_background();
-@@ -2860,7 +2910,7 @@
+@@ -2863,7 +2913,7 @@
                if (n_pend_ios < SRV_PEND_IO_THRESHOLD
                    && (n_ios - n_ios_old < SRV_RECENT_IO_ACTIVITY)) {
                        srv_main_thread_op_info = "doing insert buffer merge";
@@ -668,7 +665,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
                        /* Flush logs if needed */
                        srv_sync_log_buffer_in_background();
-@@ -2877,7 +2927,11 @@
+@@ -2880,7 +2930,11 @@
                        n_pages_flushed = buf_flush_list(
                                PCT_IO(100), IB_ULONGLONG_MAX);
  
@@ -681,7 +678,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
                        /* Try to keep the rate of flushing of dirty
                        pages such that redo log generation does not
-@@ -2893,6 +2947,224 @@
+@@ -2896,6 +2950,224 @@
                                                n_flush,
                                                IB_ULONGLONG_MAX);
                        }
@@ -906,7 +903,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
                }
  
                if (srv_activity_count == old_activity_count) {
-@@ -2941,7 +3213,7 @@
+@@ -2944,7 +3216,7 @@
        even if the server were active */
  
        srv_main_thread_op_info = "doing insert buffer merge";
@@ -915,7 +912,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
        /* Flush logs if needed */
        srv_sync_log_buffer_in_background();
-@@ -3049,7 +3321,7 @@
+@@ -3052,7 +3324,7 @@
                buf_flush_list below. Otherwise, the system favors
                clean pages over cleanup throughput. */
                n_bytes_merged = ibuf_contract_for_n_pages(FALSE,
@@ -924,15 +921,15 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
        }
  
        srv_main_thread_op_info = "reserving kernel mutex";
-@@ -3195,6 +3467,7 @@
-       srv_slot_t*     slot;
+@@ -3199,6 +3471,7 @@
+       ulint           retries = 0;
        ulint           slot_no = ULINT_UNDEFINED;
        ulint           n_total_purged = ULINT_UNDEFINED;
 +      ulint           next_itr_time;
  
        ut_a(srv_n_purge_threads == 1);
  
-@@ -3217,9 +3490,12 @@
+@@ -3221,9 +3494,12 @@
  
        mutex_exit(&kernel_mutex);
  
@@ -940,12 +937,12 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 +
        while (srv_shutdown_state != SRV_SHUTDOWN_EXIT_THREADS) {
  
-               ulint   n_pages_purged;
+               ulint   n_pages_purged = 0;
 +              ulint   cur_time;
  
                /* If there are very few records to purge or the last
                purge didn't purge any records then wait for activity.
-@@ -3260,6 +3536,16 @@
+@@ -3272,6 +3548,16 @@
                } while (n_pages_purged > 0 && !srv_fast_shutdown);
  
                srv_sync_log_buffer_in_background();
@@ -965,7 +962,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
 --- a/storage/innobase/srv/srv0start.c 2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/srv/srv0start.c 2010-12-03 15:10:09.103023543 +0900
-@@ -1212,6 +1212,9 @@
+@@ -1218,6 +1218,9 @@
        } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DIRECT")) {
                srv_unix_file_flush_method = SRV_UNIX_O_DIRECT;
  
@@ -975,10 +972,26 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
        } else if (0 == ut_strcmp(srv_file_flush_method_str, "littlesync")) {
                srv_unix_file_flush_method = SRV_UNIX_LITTLESYNC;
  
+diff -ruN a/storage/innobase/trx/trx0purge.c b/storage/innobase/trx/trx0purge.c
+--- a/storage/innobase/trx/trx0purge.c 2011-04-12 14:14:14.000000000 +0900
++++ b/storage/innobase/trx/trx0purge.c 2011-04-12 14:15:44.000000000 +0900
+@@ -392,10 +392,10 @@
+       trx_sys->rseg_history_len++;
+       mutex_exit(&kernel_mutex);
+-      if (!(trx_sys->rseg_history_len % srv_purge_batch_size)) {
++//    if (!(trx_sys->rseg_history_len % srv_purge_batch_size)) { /*should wake up always*/
+               /* Inform the purge thread that there is work to do. */
+               srv_wake_purge_thread_if_not_active();
+-      }
++//    }
+ }
+ /**********************************************************************//**
 diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
 --- a/storage/innobase/trx/trx0trx.c   2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/trx/trx0trx.c   2010-12-03 15:10:09.106023937 +0900
-@@ -865,6 +865,7 @@
+@@ -925,6 +925,7 @@
        trx->read_view = NULL;
  
        if (lsn) {
@@ -986,7 +999,7 @@ diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
  
                mutex_exit(&kernel_mutex);
  
-@@ -873,6 +874,12 @@
+@@ -933,6 +934,12 @@
                        trx_undo_insert_cleanup(trx);
                }
  
@@ -999,7 +1012,7 @@ diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
                /* NOTE that we could possibly make a group commit more
                efficient here: call os_thread_yield here to allow also other
                trxs to come to commit! */
-@@ -904,9 +911,9 @@
+@@ -964,9 +971,9 @@
                if (trx->flush_log_later) {
                        /* Do nothing yet */
                        trx->must_flush_log_later = TRUE;
@@ -1011,7 +1024,7 @@ diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
                        if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {
                                /* Write the log but do not flush it to disk */
  
-@@ -918,7 +925,7 @@
+@@ -978,7 +985,7 @@
  
                                log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);
                        }
@@ -1020,7 +1033,7 @@ diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
  
                        /* Write the log but do not flush it to disk */
  
-@@ -1582,16 +1589,23 @@
+@@ -1642,16 +1649,23 @@
        trx_t*  trx)    /*!< in: trx handle */
  {
        ib_uint64_t     lsn     = trx->commit_lsn;
@@ -1046,7 +1059,7 @@ diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
                if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {
                        /* Write the log but do not flush it to disk */
  
-@@ -1602,7 +1616,7 @@
+@@ -1662,7 +1676,7 @@
  
                        log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);
                }
@@ -1055,7 +1068,7 @@ diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
  
                /* Write the log but do not flush it to disk */
  
-@@ -1855,6 +1869,8 @@
+@@ -1915,6 +1929,8 @@
        /*--------------------------------------*/
  
        if (lsn) {
@@ -1064,7 +1077,7 @@ diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
                /* Depending on the my.cnf options, we may now write the log
                buffer to the log files, making the prepared state of the
                transaction durable if the OS does not crash. We may also
-@@ -1874,9 +1890,15 @@
+@@ -1934,9 +1950,15 @@
  
                mutex_exit(&kernel_mutex);
  
@@ -1082,7 +1095,7 @@ diff -ruN a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
                        if (srv_unix_file_flush_method == SRV_UNIX_NOSYNC) {
                                /* Write the log but do not flush it to disk */
  
-@@ -1888,7 +1910,7 @@
+@@ -1948,7 +1970,7 @@
  
                                log_write_up_to(lsn, LOG_WAIT_ONE_GROUP, TRUE);
                        }
This page took 0.125791 seconds and 4 git commands to generate.