]> git.pld-linux.org Git - packages/mysql.git/blobdiff - innodb_buffer_pool_shm.patch
- update percona patches (mysql_dump_ignore_ct.patch needs updating)
[packages/mysql.git] / innodb_buffer_pool_shm.patch
index 4097046e01aabca35484b764ec5573393f5de8b9..8efacadab15d52a53b932f1cc3340eab6a9da85e 100644 (file)
@@ -131,7 +131,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  /********************************************************************//**
  Allocates a chunk of buffer frames.
  @return       chunk, or NULL on failure */
-@@ -1001,26 +1082,188 @@
+@@ -1001,26 +1082,190 @@
  {
        buf_block_t*    block;
        byte*           frame;
@@ -139,11 +139,13 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
 +      ulint           zip_hash_mem_size = 0;
 +      hash_table_t*   zip_hash_tmp = NULL;
        ulint           i;
++      ulint           size_target;
 +      buf_shm_info_t* shm_info = NULL;
  
        /* Round down to a multiple of page size,
        although it already should be. */
        mem_size = ut_2pow_round(mem_size, UNIV_PAGE_SIZE);
++      size_target = (mem_size / UNIV_PAGE_SIZE) - 1;
 +
 +      srv_buffer_pool_shm_is_reused = FALSE;
 +
@@ -320,7 +322,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
        /* Align a pointer to the first frame.  Note that when
        os_large_page_size is smaller than UNIV_PAGE_SIZE,
-@@ -1028,8 +1271,13 @@
+@@ -1028,8 +1273,13 @@
        it is bigger, we may allocate more blocks than requested. */
  
        frame = ut_align(chunk->mem, UNIV_PAGE_SIZE);
@@ -334,10 +336,14 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
        /* Subtract the space needed for block descriptors. */
        {
-@@ -1043,6 +1291,98 @@
+@@ -1043,6 +1293,102 @@
                chunk->size = size;
        }
  
++      if (chunk->size > size_target) {
++              chunk->size = size_target;
++      }
++
 +      if (shm_info && !(shm_info->is_new)) {
 +              /* convert the shared memory segment for reuse */
 +              ptrdiff_t       phys_offset;
@@ -433,7 +439,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        /* Init block structs and assign frames for them. Then we
        assign the frames to the first blocks (we already mapped the
        memory above). */
-@@ -1068,6 +1408,11 @@
+@@ -1068,6 +1414,11 @@
                block++;
                frame += UNIV_PAGE_SIZE;
        }
@@ -445,7 +451,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
  #ifdef PFS_GROUP_BUFFER_SYNC
        pfs_register_buffer_block(chunk);
-@@ -1249,6 +1594,8 @@
+@@ -1249,6 +1600,8 @@
                UNIV_MEM_UNDESC(block);
        }
  
@@ -454,7 +460,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        os_mem_free_large(chunk->mem, chunk->mem_size);
  }
  
-@@ -1289,7 +1636,7 @@
+@@ -1289,7 +1642,7 @@
        ulint           instance_no)    /*!< in: id of the instance */
  {
        ulint           i;
@@ -463,7 +469,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
        /* 1. Initialize general fields
        ------------------------------- */
-@@ -1335,7 +1682,10 @@
+@@ -1335,7 +1688,10 @@
                buf_pool->curr_pool_size = buf_pool->curr_size * UNIV_PAGE_SIZE;
  
                buf_pool->page_hash = hash_create(2 * buf_pool->curr_size);
@@ -474,7 +480,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                
                buf_pool->last_printout_time = ut_time();
        }
-@@ -1354,6 +1704,86 @@
+@@ -1354,6 +1710,86 @@
  
        /* All fields are initialized by mem_zalloc(). */
  
@@ -561,7 +567,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        mutex_exit(&buf_pool->LRU_list_mutex);
        rw_lock_x_unlock(&buf_pool->page_hash_latch);
        buf_pool_mutex_exit(buf_pool);
-@@ -1373,6 +1803,42 @@
+@@ -1373,6 +1809,42 @@
        buf_chunk_t*    chunk;
        buf_chunk_t*    chunks;
  
@@ -604,7 +610,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        chunks = buf_pool->chunks;
        chunk = chunks + buf_pool->n_chunks;
  
-@@ -1381,10 +1847,13 @@
+@@ -1381,10 +1853,13 @@
                would fail at shutdown. */
                os_mem_free_large(chunk->mem, chunk->mem_size);
        }
@@ -618,7 +624,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  }
  
  /********************************************************************//**
-@@ -1668,6 +2137,11 @@
+@@ -1668,6 +2143,11 @@
        //buf_pool_mutex_enter(buf_pool);
        mutex_enter(&buf_pool->LRU_list_mutex);
  
@@ -630,7 +636,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  shrink_again:
        if (buf_pool->n_chunks <= 1) {
  
-@@ -1848,7 +2322,7 @@
+@@ -1848,7 +2328,7 @@
        zip_hash = hash_create(2 * buf_pool->curr_size);
  
        HASH_MIGRATE(buf_pool->zip_hash, zip_hash, buf_page_t, hash,
@@ -639,7 +645,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
        hash_table_free(buf_pool->zip_hash);
        buf_pool->zip_hash = zip_hash;
-@@ -2130,6 +2604,11 @@
+@@ -2130,6 +2610,11 @@
        ulint   change_size;
        ulint   min_change_size = 1048576 * srv_buf_pool_instances;
  
@@ -776,7 +782,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency,
    PLUGIN_VAR_RQCMDARG,
    "Helps in performance tuning in heavily concurrent environments.",
-@@ -11922,6 +11942,8 @@
+@@ -11939,6 +11959,8 @@
    MYSQL_SYSVAR(autoextend_increment),
    MYSQL_SYSVAR(buffer_pool_size),
    MYSQL_SYSVAR(buffer_pool_instances),
@@ -796,7 +802,7 @@ diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0bu
  
  /** @name Modes for buf_page_get_gen */
  /* @{ */
-@@ -1591,9 +1592,12 @@
+@@ -1592,9 +1593,12 @@
  /**********************************************************************//**
  Compute the hash fold value for blocks in buf_pool->zip_hash. */
  /* @{ */
This page took 0.037874 seconds and 4 git commands to generate.