summaryrefslogtreecommitdiff
path: root/storage/xtradb/buf
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/buf')
-rw-r--r--storage/xtradb/buf/buf0buf.cc14
-rw-r--r--storage/xtradb/buf/buf0dump.cc5
2 files changed, 13 insertions, 6 deletions
diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc
index d4a6d669bf9..a5c8da7c5a9 100644
--- a/storage/xtradb/buf/buf0buf.cc
+++ b/storage/xtradb/buf/buf0buf.cc
@@ -55,6 +55,9 @@ Created 11/5/1995 Heikki Tuuri
#include "page0zip.h"
#include "srv0mon.h"
#include "buf0checksum.h"
+
+UNIV_INTERN my_bool srv_numa_interleave = FALSE;
+
#ifdef HAVE_LIBNUMA
#include <numa.h>
#include <numaif.h>
@@ -1405,7 +1408,8 @@ buf_chunk_init(
/*===========*/
buf_pool_t* buf_pool, /*!< in: buffer pool instance */
buf_chunk_t* chunk, /*!< out: chunk of buffers */
- ulint mem_size) /*!< in: requested size in bytes */
+ ulint mem_size, /*!< in: requested size in bytes */
+ bool populate) /*!< in: virtual page preallocation */
{
buf_block_t* block;
byte* frame;
@@ -1421,7 +1425,7 @@ buf_chunk_init(
+ (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE);
chunk->mem_size = mem_size;
- chunk->mem = os_mem_alloc_large(&chunk->mem_size);
+ chunk->mem = os_mem_alloc_large(&chunk->mem_size, populate);
if (UNIV_UNLIKELY(chunk->mem == NULL)) {
@@ -1640,6 +1644,7 @@ buf_pool_init_instance(
/*===================*/
buf_pool_t* buf_pool, /*!< in: buffer pool instance */
ulint buf_pool_size, /*!< in: size in bytes */
+ bool populate, /*!< in: virtual page preallocation */
ulint instance_no) /*!< in: id of the instance */
{
ulint i;
@@ -1666,7 +1671,7 @@ buf_pool_init_instance(
buf_pool->chunks = chunk =
(buf_chunk_t*) mem_zalloc(sizeof *chunk);
- if (!buf_chunk_init(buf_pool, chunk, buf_pool_size)) {
+ if (!buf_chunk_init(buf_pool, chunk, buf_pool_size, populate)) {
mem_free(chunk);
mem_free(buf_pool);
@@ -1821,6 +1826,7 @@ dberr_t
buf_pool_init(
/*==========*/
ulint total_size, /*!< in: size of the total pool in bytes */
+ bool populate, /*!< in: virtual page preallocation */
ulint n_instances) /*!< in: number of instances */
{
ulint i;
@@ -1851,7 +1857,7 @@ buf_pool_init(
for (i = 0; i < n_instances; i++) {
buf_pool_t* ptr = &buf_pool_ptr[i];
- if (buf_pool_init_instance(ptr, size, i) != DB_SUCCESS) {
+ if (buf_pool_init_instance(ptr, size, populate, i) != DB_SUCCESS) {
/* Free all the instances created so far. */
buf_pool_free(i);
diff --git a/storage/xtradb/buf/buf0dump.cc b/storage/xtradb/buf/buf0dump.cc
index e9168d9f5d5..f73bf3bdc58 100644
--- a/storage/xtradb/buf/buf0dump.cc
+++ b/storage/xtradb/buf/buf0dump.cc
@@ -200,8 +200,9 @@ buf_dump(
{
#define SHOULD_QUIT() (SHUTTING_DOWN() && obey_shutdown)
+ static const char format_name[]= "%s.incomplete";
char full_filename[OS_FILE_MAX_PATH];
- char tmp_filename[OS_FILE_MAX_PATH + sizeof "incomplete"];
+ char tmp_filename[OS_FILE_MAX_PATH + sizeof(format_name)];
char now[32];
FILE* f;
ulint i;
@@ -212,7 +213,7 @@ buf_dump(
srv_buf_dump_filename);
ut_snprintf(tmp_filename, sizeof(tmp_filename),
- "%s.incomplete", full_filename);
+ format_name, full_filename);
buf_dump_status(STATUS_NOTICE, "Dumping buffer pool(s) to %s",
full_filename);