Commit 89bacf34 authored by marko's avatar marko

branches/zip: Remove support for AWE (Intel PAE on Win32).

Removal of the variable innobase_buffer_pool_awe_mem_mb requires
coordination with MySQL AB.
parent d9e1e326
...@@ -369,7 +369,6 @@ btr_cur_search_to_nth_level( ...@@ -369,7 +369,6 @@ btr_cur_search_to_nth_level(
#ifdef PAGE_CUR_LE_OR_EXTENDS #ifdef PAGE_CUR_LE_OR_EXTENDS
&& mode != PAGE_CUR_LE_OR_EXTENDS && mode != PAGE_CUR_LE_OR_EXTENDS
#endif /* PAGE_CUR_LE_OR_EXTENDS */ #endif /* PAGE_CUR_LE_OR_EXTENDS */
&& srv_use_adaptive_hash_indexes
&& btr_search_guess_on_hash(index, info, tuple, mode, && btr_search_guess_on_hash(index, info, tuple, mode,
latch_mode, cursor, latch_mode, cursor,
has_search_latch, mtr)) { has_search_latch, mtr)) {
...@@ -604,10 +603,7 @@ retry_page_get: ...@@ -604,10 +603,7 @@ retry_page_get:
cursor->up_bytes = up_bytes; cursor->up_bytes = up_bytes;
#ifdef BTR_CUR_ADAPT #ifdef BTR_CUR_ADAPT
if (srv_use_adaptive_hash_indexes) { btr_search_info_update(index, cursor);
btr_search_info_update(index, cursor);
}
#endif #endif
ut_ad(cursor->up_match != ULINT_UNDEFINED ut_ad(cursor->up_match != ULINT_UNDEFINED
|| mode != PAGE_CUR_GE); || mode != PAGE_CUR_GE);
......
...@@ -197,7 +197,6 @@ btr_pcur_restore_position( ...@@ -197,7 +197,6 @@ btr_pcur_restore_position(
mtr_t* mtr) /* in: mtr */ mtr_t* mtr) /* in: mtr */
{ {
dict_index_t* index; dict_index_t* index;
page_t* page;
dtuple_t* tuple; dtuple_t* tuple;
ulint mode; ulint mode;
ulint old_mode; ulint old_mode;
...@@ -235,15 +234,13 @@ btr_pcur_restore_position( ...@@ -235,15 +234,13 @@ btr_pcur_restore_position(
ut_a(cursor->old_rec); ut_a(cursor->old_rec);
ut_a(cursor->old_n_fields); ut_a(cursor->old_n_fields);
page = btr_cur_get_page(btr_pcur_get_btr_cur(cursor));
if (UNIV_LIKELY(latch_mode == BTR_SEARCH_LEAF) if (UNIV_LIKELY(latch_mode == BTR_SEARCH_LEAF)
|| UNIV_LIKELY(latch_mode == BTR_MODIFY_LEAF)) { || UNIV_LIKELY(latch_mode == BTR_MODIFY_LEAF)) {
/* Try optimistic restoration */ /* Try optimistic restoration */
if (UNIV_LIKELY(buf_page_optimistic_get( if (UNIV_LIKELY(buf_page_optimistic_get(
latch_mode, latch_mode,
cursor->block_when_stored, page, cursor->block_when_stored,
cursor->modify_clock, mtr))) { cursor->modify_clock, mtr))) {
cursor->pos_state = BTR_PCUR_IS_POSITIONED; cursor->pos_state = BTR_PCUR_IS_POSITIONED;
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
......
This diff is collapsed.
...@@ -640,19 +640,6 @@ buf_flush_try_page( ...@@ -640,19 +640,6 @@ buf_flush_try_page(
block->io_fix = BUF_IO_WRITE; block->io_fix = BUF_IO_WRITE;
/* If AWE is enabled and the page is not mapped to a frame,
then map it */
if (block->frame == NULL) {
ut_a(srv_use_awe);
/* We set second parameter TRUE because the block is
in the LRU list and we must put it to
awe_LRU_free_mapped list once mapped to a frame */
buf_awe_map_page_to_frame(block, TRUE);
}
block->flush_type = flush_type; block->flush_type = flush_type;
if (buf_pool->n_flush[flush_type] == 0) { if (buf_pool->n_flush[flush_type] == 0) {
...@@ -707,19 +694,6 @@ buf_flush_try_page( ...@@ -707,19 +694,6 @@ buf_flush_try_page(
block->io_fix = BUF_IO_WRITE; block->io_fix = BUF_IO_WRITE;
/* If AWE is enabled and the page is not mapped to a frame,
then map it */
if (block->frame == NULL) {
ut_a(srv_use_awe);
/* We set second parameter TRUE because the block is
in the LRU list and we must put it to
awe_LRU_free_mapped list once mapped to a frame */
buf_awe_map_page_to_frame(block, TRUE);
}
block->flush_type = flush_type; block->flush_type = flush_type;
if (buf_pool->n_flush[flush_type] == 0) { if (buf_pool->n_flush[flush_type] == 0) {
...@@ -746,19 +720,6 @@ buf_flush_try_page( ...@@ -746,19 +720,6 @@ buf_flush_try_page(
block->io_fix = BUF_IO_WRITE; block->io_fix = BUF_IO_WRITE;
/* If AWE is enabled and the page is not mapped to a frame,
then map it */
if (block->frame == NULL) {
ut_a(srv_use_awe);
/* We set second parameter TRUE because the block is
in the LRU list and we must put it to
awe_LRU_free_mapped list once mapped to a frame */
buf_awe_map_page_to_frame(block, TRUE);
}
block->flush_type = flush_type; block->flush_type = flush_type;
if (buf_pool->n_flush[block->flush_type] == 0) { if (buf_pool->n_flush[block->flush_type] == 0) {
......
...@@ -227,13 +227,10 @@ buf_LRU_search_and_free_block( ...@@ -227,13 +227,10 @@ buf_LRU_search_and_free_block(
mutex_exit(&(buf_pool->mutex)); mutex_exit(&(buf_pool->mutex));
/* Remove possible adaptive hash index built on the /* Remove possible adaptive hash index on the page */
page; in the case of AWE the block may not have a
frame at all */ btr_search_drop_page_hash_index(block);
if (block->frame) {
btr_search_drop_page_hash_index(block);
}
mutex_enter(&(buf_pool->mutex)); mutex_enter(&(buf_pool->mutex));
ut_a(block->buf_fix_count == 0); ut_a(block->buf_fix_count == 0);
...@@ -328,9 +325,7 @@ LRU list to the free list. */ ...@@ -328,9 +325,7 @@ LRU list to the free list. */
buf_block_t* buf_block_t*
buf_LRU_get_free_block( buf_LRU_get_free_block(
/*===================*/ /*===================*/
/* out: the free control block; also if AWE is /* out: the free control block */
used, it is guaranteed that the block has its
page mapped to a frame when we return */
ulint zip_size) /* in: compressed page size in bytes, ulint zip_size) /* in: compressed page size in bytes,
or 0 if uncompressed tablespace */ or 0 if uncompressed tablespace */
{ {
...@@ -414,22 +409,6 @@ loop: ...@@ -414,22 +409,6 @@ loop:
ut_a(block->state != BUF_BLOCK_FILE_PAGE); ut_a(block->state != BUF_BLOCK_FILE_PAGE);
ut_a(!block->in_LRU_list); ut_a(!block->in_LRU_list);
if (srv_use_awe) {
if (block->frame) {
/* Remove from the list of mapped pages */
UT_LIST_REMOVE(awe_LRU_free_mapped,
buf_pool->awe_LRU_free_mapped,
block);
} else {
/* We map the page to a frame; second param
FALSE below because we do not want it to be
added to the awe_LRU_free_mapped list */
buf_awe_map_page_to_frame(block, FALSE);
}
}
if (block->page_zip.size != zip_size) { if (block->page_zip.size != zip_size) {
block->page_zip.size = zip_size; block->page_zip.size = zip_size;
block->page_zip.n_blobs = 0; block->page_zip.n_blobs = 0;
...@@ -649,13 +628,6 @@ buf_LRU_remove_block( ...@@ -649,13 +628,6 @@ buf_LRU_remove_block(
UT_LIST_REMOVE(LRU, buf_pool->LRU, block); UT_LIST_REMOVE(LRU, buf_pool->LRU, block);
block->in_LRU_list = FALSE; block->in_LRU_list = FALSE;
if (srv_use_awe && block->frame) {
/* Remove from the list of mapped pages */
UT_LIST_REMOVE(awe_LRU_free_mapped,
buf_pool->awe_LRU_free_mapped, block);
}
/* If the LRU list is so short that LRU_old not defined, return */ /* If the LRU list is so short that LRU_old not defined, return */
if (UT_LIST_GET_LEN(buf_pool->LRU) < BUF_LRU_OLD_MIN_LEN) { if (UT_LIST_GET_LEN(buf_pool->LRU) < BUF_LRU_OLD_MIN_LEN) {
...@@ -708,13 +680,6 @@ buf_LRU_add_block_to_end_low( ...@@ -708,13 +680,6 @@ buf_LRU_add_block_to_end_low(
UT_LIST_ADD_LAST(LRU, buf_pool->LRU, block); UT_LIST_ADD_LAST(LRU, buf_pool->LRU, block);
block->in_LRU_list = TRUE; block->in_LRU_list = TRUE;
if (srv_use_awe && block->frame) {
/* Add to the list of mapped pages */
UT_LIST_ADD_LAST(awe_LRU_free_mapped,
buf_pool->awe_LRU_free_mapped, block);
}
if (UT_LIST_GET_LEN(buf_pool->LRU) >= BUF_LRU_OLD_MIN_LEN) { if (UT_LIST_GET_LEN(buf_pool->LRU) >= BUF_LRU_OLD_MIN_LEN) {
buf_pool->LRU_old_len++; buf_pool->LRU_old_len++;
...@@ -763,15 +728,6 @@ buf_LRU_add_block_low( ...@@ -763,15 +728,6 @@ buf_LRU_add_block_low(
block->old = old; block->old = old;
cl = buf_pool_clock_tic(); cl = buf_pool_clock_tic();
if (srv_use_awe && block->frame) {
/* Add to the list of mapped pages; for simplicity we always
add to the start, even if the user would have set 'old'
TRUE */
UT_LIST_ADD_FIRST(awe_LRU_free_mapped,
buf_pool->awe_LRU_free_mapped, block);
}
if (!old || (UT_LIST_GET_LEN(buf_pool->LRU) < BUF_LRU_OLD_MIN_LEN)) { if (!old || (UT_LIST_GET_LEN(buf_pool->LRU) < BUF_LRU_OLD_MIN_LEN)) {
UT_LIST_ADD_FIRST(LRU, buf_pool->LRU, block); UT_LIST_ADD_FIRST(LRU, buf_pool->LRU, block);
...@@ -877,15 +833,7 @@ buf_LRU_block_free_non_file_page( ...@@ -877,15 +833,7 @@ buf_LRU_block_free_non_file_page(
UT_LIST_ADD_FIRST(free, buf_pool->free, block); UT_LIST_ADD_FIRST(free, buf_pool->free, block);
block->in_free_list = TRUE; block->in_free_list = TRUE;
if (srv_use_awe && block->frame) { UNIV_MEM_INVALID(block->frame, UNIV_PAGE_SIZE);
/* Add to the list of mapped pages */
UT_LIST_ADD_FIRST(awe_LRU_free_mapped,
buf_pool->awe_LRU_free_mapped, block);
UNIV_MEM_INVALID(block->frame, UNIV_PAGE_SIZE);
} else {
UNIV_MEM_INVALID(block->frame, UNIV_PAGE_SIZE);
}
} }
/********************************************************************** /**********************************************************************
...@@ -914,8 +862,6 @@ buf_LRU_block_remove_hashed_page( ...@@ -914,8 +862,6 @@ buf_LRU_block_remove_hashed_page(
buf_pool->freed_page_clock += 1; buf_pool->freed_page_clock += 1;
/* Note that if AWE is enabled the block may not have a frame at all */
buf_block_modify_clock_inc(block); buf_block_modify_clock_inc(block);
hashed_block = buf_page_hash_get(block->space, block->offset); hashed_block = buf_page_hash_get(block->space, block->offset);
......
...@@ -1536,22 +1536,10 @@ innobase_init(void *p) ...@@ -1536,22 +1536,10 @@ innobase_init(void *p)
/* We set srv_pool_size here in units of 1 kB. InnoDB internally /* We set srv_pool_size here in units of 1 kB. InnoDB internally
changes the value so that it becomes the number of database pages. */ changes the value so that it becomes the number of database pages. */
if (innobase_buffer_pool_awe_mem_mb == 0) { /* Careful here: we first convert the signed long int to ulint
/* Careful here: we first convert the signed long int to ulint and only after that divide */
and only after that divide */
srv_pool_size = ((ulint) innobase_buffer_pool_size) / 1024; srv_pool_size = ((ulint) innobase_buffer_pool_size) / 1024;
} else {
srv_use_awe = TRUE;
srv_pool_size = (ulint)
(1024 * innobase_buffer_pool_awe_mem_mb);
srv_awe_window_size = (ulint) innobase_buffer_pool_size;
/* Note that what the user specified as
innodb_buffer_pool_size is actually the AWE memory window
size in this case, and the real buffer pool size is
determined by .._awe_mem_mb. */
}
srv_mem_pool_size = (ulint) innobase_additional_mem_pool_size; srv_mem_pool_size = (ulint) innobase_additional_mem_pool_size;
......
...@@ -476,8 +476,7 @@ struct btr_pcur_struct{ ...@@ -476,8 +476,7 @@ struct btr_pcur_struct{
cursor was on, before, or after the cursor was on, before, or after the
old_rec record */ old_rec record */
buf_block_t* block_when_stored;/* buffer block when the position was buf_block_t* block_when_stored;/* buffer block when the position was
stored; note that if AWE is on, frames stored */
may move */
dulint modify_clock; /* the modify clock value of the dulint modify_clock; /* the modify clock value of the
buffer block when the cursor position buffer block when the cursor position
was stored */ was stored */
......
...@@ -75,25 +75,18 @@ buf_pool_init( ...@@ -75,25 +75,18 @@ buf_pool_init(
enough memory or error */ enough memory or error */
ulint max_size, /* in: maximum size of the buf_pool in ulint max_size, /* in: maximum size of the buf_pool in
blocks */ blocks */
ulint curr_size, /* in: current size to use, must be <= ulint curr_size); /* in: current size to use, must be <=
max_size, currently must be equal to max_size, currently must be equal to
max_size */ max_size */
ulint n_frames); /* in: number of frames; if AWE is used,
this is the size of the address space window
where physical memory pages are mapped; if
AWE is not used then this must be the same
as max_size */
/************************************************************************* /*************************************************************************
Gets the current size of buffer buf_pool in bytes. In the case of AWE, the Gets the current size of buffer buf_pool in bytes. */
size of AWE window (= the frames). */
UNIV_INLINE UNIV_INLINE
ulint ulint
buf_pool_get_curr_size(void); buf_pool_get_curr_size(void);
/*========================*/ /*========================*/
/* out: size in bytes */ /* out: size in bytes */
/************************************************************************* /*************************************************************************
Gets the maximum size of buffer pool in bytes. In the case of AWE, the Gets the maximum size of buffer pool in bytes. */
size of AWE window (= the frames). */
UNIV_INLINE UNIV_INLINE
ulint ulint
buf_pool_get_max_size(void); buf_pool_get_max_size(void);
...@@ -114,9 +107,7 @@ UNIV_INLINE ...@@ -114,9 +107,7 @@ UNIV_INLINE
buf_block_t* buf_block_t*
buf_block_alloc( buf_block_alloc(
/*============*/ /*============*/
/* out, own: the allocated block; also if AWE /* out, own: the allocated block */
is used it is guaranteed that the page is
mapped to a frame */
ulint zip_size); /* in: compressed page size in bytes, ulint zip_size); /* in: compressed page size in bytes,
or 0 if uncompressed tablespace */ or 0 if uncompressed tablespace */
/************************************************************************ /************************************************************************
...@@ -161,8 +152,8 @@ improve debugging. Only values RW_S_LATCH and RW_X_LATCH are allowed as LA! */ ...@@ -161,8 +152,8 @@ improve debugging. Only values RW_S_LATCH and RW_X_LATCH are allowed as LA! */
NOTE! The following macros should be used instead of NOTE! The following macros should be used instead of
buf_page_optimistic_get_func, to improve debugging. Only values RW_S_LATCH and buf_page_optimistic_get_func, to improve debugging. Only values RW_S_LATCH and
RW_X_LATCH are allowed as LA! */ RW_X_LATCH are allowed as LA! */
#define buf_page_optimistic_get(LA, BL, G, MC, MTR) \ #define buf_page_optimistic_get(LA, BL, MC, MTR) \
buf_page_optimistic_get_func(LA, BL, G, MC, __FILE__, __LINE__, MTR) buf_page_optimistic_get_func(LA, BL, MC, __FILE__, __LINE__, MTR)
/************************************************************************ /************************************************************************
This is the general function used to get optimistic access to a database This is the general function used to get optimistic access to a database
page. */ page. */
...@@ -173,8 +164,6 @@ buf_page_optimistic_get_func( ...@@ -173,8 +164,6 @@ buf_page_optimistic_get_func(
/* out: TRUE if success */ /* out: TRUE if success */
ulint rw_latch,/* in: RW_S_LATCH, RW_X_LATCH */ ulint rw_latch,/* in: RW_S_LATCH, RW_X_LATCH */
buf_block_t* block, /* in: guessed block */ buf_block_t* block, /* in: guessed block */
buf_frame_t* guess, /* in: guessed frame; note that AWE may move
frames */
dulint modify_clock,/* in: modify clock value if mode is dulint modify_clock,/* in: modify clock value if mode is
..._GUESS_ON_CLOCK */ ..._GUESS_ON_CLOCK */
const char* file, /* in: file name */ const char* file, /* in: file name */
...@@ -531,19 +520,6 @@ buf_pool_invalidate(void); ...@@ -531,19 +520,6 @@ buf_pool_invalidate(void);
--------------------------- LOWER LEVEL ROUTINES ------------------------- --------------------------- LOWER LEVEL ROUTINES -------------------------
=========================================================================*/ =========================================================================*/
/************************************************************************
Maps the page of block to a frame, if not mapped yet. Unmaps some page
from the end of the awe_LRU_free_mapped. */
void
buf_awe_map_page_to_frame(
/*======================*/
buf_block_t* block, /* in: block whose page should be
mapped to a frame */
ibool add_to_mapped_list);/* in: TRUE if we in the case
we need to map the page should also
add the block to the
awe_LRU_free_mapped list */
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
/************************************************************************* /*************************************************************************
Adds latch level info for the rw-lock protecting the buffer frame. This Adds latch level info for the rw-lock protecting the buffer frame. This
...@@ -720,16 +696,7 @@ struct buf_block_struct{ ...@@ -720,16 +696,7 @@ struct buf_block_struct{
byte* frame; /* pointer to buffer frame which byte* frame; /* pointer to buffer frame which
is of size UNIV_PAGE_SIZE, and is of size UNIV_PAGE_SIZE, and
aligned to an address divisible by aligned to an address divisible by
UNIV_PAGE_SIZE; if AWE is used, this UNIV_PAGE_SIZE */
will be NULL for the pages which are
currently not mapped into the virtual
address space window of the buffer
pool */
os_awe_t* awe_info; /* if AWE is used, then an array of
awe page infos for
UNIV_PAGE_SIZE / OS_AWE_X86_PAGE_SIZE
(normally = 4) physical memory
pages; otherwise NULL */
ulint space; /* space id of the page */ ulint space; /* space id of the page */
ulint offset; /* page number within the space */ ulint offset; /* page number within the space */
ulint lock_hash_val; /* hashed value of the page address ulint lock_hash_val; /* hashed value of the page address
...@@ -776,10 +743,6 @@ struct buf_block_struct{ ...@@ -776,10 +743,6 @@ struct buf_block_struct{
debugging */ debugging */
UT_LIST_NODE_T(buf_block_t) LRU; UT_LIST_NODE_T(buf_block_t) LRU;
/* node of the LRU list */ /* node of the LRU list */
UT_LIST_NODE_T(buf_block_t) awe_LRU_free_mapped;
/* in the AWE version node in the
list of free and LRU blocks which are
mapped to a frame */
ibool in_LRU_list; /* TRUE of the page is in the LRU list; ibool in_LRU_list; /* TRUE of the page is in the LRU list;
used in debugging */ used in debugging */
ulint LRU_position; /* value which monotonically ulint LRU_position; /* value which monotonically
...@@ -886,10 +849,7 @@ struct buf_pool_struct{ ...@@ -886,10 +849,7 @@ struct buf_pool_struct{
struct and control blocks, except the struct and control blocks, except the
read-write lock in them */ read-write lock in them */
byte* frame_mem; /* pointer to the memory area which byte* frame_mem; /* pointer to the memory area which
was allocated for the frames; in AWE was allocated for the frames */
this is the virtual address space
window where we map pages stored
in physical memory */
byte* frame_zero; /* pointer to the first buffer frame: byte* frame_zero; /* pointer to the first buffer frame:
this may differ from frame_mem, because this may differ from frame_mem, because
this is aligned by the frame size */ this is aligned by the frame size */
...@@ -905,12 +865,7 @@ struct buf_pool_struct{ ...@@ -905,12 +865,7 @@ struct buf_pool_struct{
frame_zero + UNIV_PAGE_SIZE, ... frame_zero + UNIV_PAGE_SIZE, ...
a control block is always assigned a control block is always assigned
for each frame, even if the frame does for each frame, even if the frame does
not contain any data; note that in AWE not contain any data */
there are more control blocks than
buffer frames */
os_awe_t* awe_info; /* if AWE is used, AWE info for the
physical 4 kB memory pages associated
with buffer frames */
ulint max_size; /* number of control blocks == ulint max_size; /* number of control blocks ==
maximum pool size in pages */ maximum pool size in pages */
ulint curr_size; /* current pool size in pages; ulint curr_size; /* current pool size in pages;
...@@ -932,9 +887,6 @@ struct buf_pool_struct{ ...@@ -932,9 +887,6 @@ struct buf_pool_struct{
counted as page gets; this field counted as page gets; this field
is NOT protected by the buffer is NOT protected by the buffer
pool mutex */ pool mutex */
ulint n_pages_awe_remapped; /* if AWE is enabled, the
number of remaps of blocks to
buffer frames */
ulint n_page_gets_old;/* n_page_gets when buf_print was ulint n_page_gets_old;/* n_page_gets when buf_print was
last time called: used to calculate last time called: used to calculate
hit rate */ hit rate */
...@@ -943,7 +895,6 @@ struct buf_pool_struct{ ...@@ -943,7 +895,6 @@ struct buf_pool_struct{
ulint n_pages_written_old;/* number write operations */ ulint n_pages_written_old;/* number write operations */
ulint n_pages_created_old;/* number of pages created in ulint n_pages_created_old;/* number of pages created in
the pool with no read */ the pool with no read */
ulint n_pages_awe_remapped_old;
/* 2. Page flushing algorithm fields */ /* 2. Page flushing algorithm fields */
UT_LIST_BASE_NODE_T(buf_block_t) flush_list; UT_LIST_BASE_NODE_T(buf_block_t) flush_list;
...@@ -976,10 +927,7 @@ struct buf_pool_struct{ ...@@ -976,10 +927,7 @@ struct buf_pool_struct{
/* 3. LRU replacement algorithm fields */ /* 3. LRU replacement algorithm fields */
UT_LIST_BASE_NODE_T(buf_block_t) free; UT_LIST_BASE_NODE_T(buf_block_t) free;
/* base node of the free block list; /* base node of the free block list */
in the case of AWE, at the start are
always free blocks for which the
physical memory is mapped to a frame */
UT_LIST_BASE_NODE_T(buf_block_t) LRU; UT_LIST_BASE_NODE_T(buf_block_t) LRU;
/* base node of the LRU list */ /* base node of the LRU list */
buf_block_t* LRU_old; /* pointer to the about 3/8 oldest buf_block_t* LRU_old; /* pointer to the about 3/8 oldest
...@@ -991,12 +939,6 @@ struct buf_pool_struct{ ...@@ -991,12 +939,6 @@ struct buf_pool_struct{
see buf0lru.c for the restrictions see buf0lru.c for the restrictions
on this value; not defined if on this value; not defined if
LRU_old == NULL */ LRU_old == NULL */
UT_LIST_BASE_NODE_T(buf_block_t) awe_LRU_free_mapped;
/* list of those blocks which are
in the LRU list or the free list, and
where the page is mapped to a frame;
thus, frames allocated, e.g., to the
locki table, are not in this list */
}; };
/* States of a control block */ /* States of a control block */
......
...@@ -32,8 +32,7 @@ buf_block_peek_if_too_old( ...@@ -32,8 +32,7 @@ buf_block_peek_if_too_old(
} }
/************************************************************************* /*************************************************************************
Gets the current size of buffer buf_pool in bytes. In the case of AWE, the Gets the current size of buffer buf_pool in bytes. */
size of AWE window (= the frames). */
UNIV_INLINE UNIV_INLINE
ulint ulint
buf_pool_get_curr_size(void) buf_pool_get_curr_size(void)
...@@ -44,8 +43,7 @@ buf_pool_get_curr_size(void) ...@@ -44,8 +43,7 @@ buf_pool_get_curr_size(void)
} }
/************************************************************************* /*************************************************************************
Gets the maximum size of buffer buf_pool in bytes. In the case of AWE, the Gets the maximum size of buffer buf_pool in bytes. */
size of AWE window (= the frames). */
UNIV_INLINE UNIV_INLINE
ulint ulint
buf_pool_get_max_size(void) buf_pool_get_max_size(void)
...@@ -314,9 +312,7 @@ UNIV_INLINE ...@@ -314,9 +312,7 @@ UNIV_INLINE
buf_block_t* buf_block_t*
buf_block_alloc( buf_block_alloc(
/*============*/ /*============*/
/* out, own: the allocated block; also if AWE /* out, own: the allocated block */
is used it is guaranteed that the page is
mapped to a frame */
ulint zip_size) /* in: compressed page size in bytes, ulint zip_size) /* in: compressed page size in bytes,
or 0 if uncompressed tablespace */ or 0 if uncompressed tablespace */
{ {
......
...@@ -87,9 +87,7 @@ LRU list to the free list. */ ...@@ -87,9 +87,7 @@ LRU list to the free list. */
buf_block_t* buf_block_t*
buf_LRU_get_free_block( buf_LRU_get_free_block(
/*===================*/ /*===================*/
/* out: the free control block; also if AWE is /* out: the free control block */
used, it is guaranteed that the block has its
page mapped to a frame when we return */
ulint zip_size); /* in: compressed page size in bytes, ulint zip_size); /* in: compressed page size in bytes,
or 0 if uncompressed tablespace */ or 0 if uncompressed tablespace */
......
...@@ -20,80 +20,10 @@ Created 9/30/1995 Heikki Tuuri ...@@ -20,80 +20,10 @@ Created 9/30/1995 Heikki Tuuri
typedef void* os_process_t; typedef void* os_process_t;
typedef unsigned long int os_process_id_t; typedef unsigned long int os_process_id_t;
/* The cell type in os_awe_allocate_mem page info */
#if defined(__WIN2000__) && defined(ULONG_PTR)
typedef ULONG_PTR os_awe_t;
#else
typedef ulint os_awe_t;
#endif
/* Physical page size when Windows AWE is used. This is the normal
page size of an Intel x86 processor. We cannot use AWE with 2 MB or 4 MB
pages. */
#define OS_AWE_X86_PAGE_SIZE 4096
extern ibool os_use_large_pages; extern ibool os_use_large_pages;
/* Large page size. This may be a boot-time option on some platforms */ /* Large page size. This may be a boot-time option on some platforms */
extern ulint os_large_page_size; extern ulint os_large_page_size;
/********************************************************************
Windows AWE support. Tries to enable the "lock pages in memory" privilege for
the current process so that the current process can allocate memory-locked
virtual address space to act as the window where AWE maps physical memory. */
ibool
os_awe_enable_lock_pages_in_mem(void);
/*=================================*/
/* out: TRUE if success, FALSE if error;
prints error info to stderr if no success */
/********************************************************************
Allocates physical RAM memory up to 64 GB in an Intel 32-bit x86
processor. */
ibool
os_awe_allocate_physical_mem(
/*=========================*/
/* out: TRUE if success */
os_awe_t** page_info, /* out, own: array of opaque data containing
the info for allocated physical memory pages;
each allocated 4 kB physical memory page has
one slot of type os_awe_t in the array */
ulint n_megabytes); /* in: number of megabytes to allocate */
/********************************************************************
Allocates a window in the virtual address space where we can map then
pages of physical memory. */
byte*
os_awe_allocate_virtual_mem_window(
/*===============================*/
/* out, own: allocated memory, or NULL if did not
succeed */
ulint size); /* in: virtual memory allocation size in bytes, must
be < 2 GB */
/********************************************************************
With this function you can map parts of physical memory allocated with
the ..._allocate_physical_mem to the virtual address space allocated with
the previous function. Intel implements this so that the process page
tables are updated accordingly. A test on a 1.5 GHz AMD processor and XP
showed that this takes < 1 microsecond, much better than the estimated 80 us
for copying a 16 kB page memory to memory. But, the operation will at least
partially invalidate the translation lookaside buffer (TLB) of all
processors. Under a real-world load the performance hit may be bigger. */
ibool
os_awe_map_physical_mem_to_window(
/*==============================*/
/* out: TRUE if success; the function
calls exit(1) in case of an error */
byte* ptr, /* in: a page-aligned pointer to
somewhere in the virtual address
space window; we map the physical mem
pages here */
ulint n_mem_pages, /* in: number of 4 kB mem pages to
map */
os_awe_t* page_info); /* in: array of page infos for those
pages; each page has one slot in the
array */
/******************************************************************** /********************************************************************
Converts the current process id to a number. It is not guaranteed that the Converts the current process id to a number. It is not guaranteed that the
number is unique. In Linux returns the 'process number' of the current number is unique. In Linux returns the 'process number' of the current
......
...@@ -85,7 +85,6 @@ extern ulong srv_flush_log_at_trx_commit; ...@@ -85,7 +85,6 @@ extern ulong srv_flush_log_at_trx_commit;
extern byte srv_latin1_ordering[256];/* The sort order table of the latin1 extern byte srv_latin1_ordering[256];/* The sort order table of the latin1
character set */ character set */
extern ulint srv_pool_size; extern ulint srv_pool_size;
extern ulint srv_awe_window_size;
extern ulint srv_mem_pool_size; extern ulint srv_mem_pool_size;
extern ulint srv_lock_table_size; extern ulint srv_lock_table_size;
...@@ -132,8 +131,6 @@ extern int srv_query_thread_priority; ...@@ -132,8 +131,6 @@ extern int srv_query_thread_priority;
extern ulong srv_max_buf_pool_modified_pct; extern ulong srv_max_buf_pool_modified_pct;
extern ulong srv_max_purge_lag; extern ulong srv_max_purge_lag;
extern ibool srv_use_awe;
extern ibool srv_use_adaptive_hash_indexes;
/*-------------------------------------------*/ /*-------------------------------------------*/
extern ulint srv_n_rows_inserted; extern ulint srv_n_rows_inserted;
......
This diff is collapsed.
...@@ -163,10 +163,6 @@ ulint srv_pool_size = ULINT_MAX; /* size in pages; MySQL inits ...@@ -163,10 +163,6 @@ ulint srv_pool_size = ULINT_MAX; /* size in pages; MySQL inits
this to size in kilobytes but this to size in kilobytes but
we normalize this to pages in we normalize this to pages in
srv_boot() */ srv_boot() */
ulint srv_awe_window_size = 0; /* size in pages; MySQL inits
this to bytes, but we
normalize it to pages in
srv_boot() */
ulint srv_mem_pool_size = ULINT_MAX; /* size in bytes */ ulint srv_mem_pool_size = ULINT_MAX; /* size in bytes */
ulint srv_lock_table_size = ULINT_MAX; ulint srv_lock_table_size = ULINT_MAX;
...@@ -323,11 +319,6 @@ ibool srv_use_checksums = TRUE; ...@@ -323,11 +319,6 @@ ibool srv_use_checksums = TRUE;
ibool srv_set_thread_priorities = TRUE; ibool srv_set_thread_priorities = TRUE;
int srv_query_thread_priority = 0; int srv_query_thread_priority = 0;
/* TRUE if the Address Windowing Extensions of Windows are used; then we must
disable adaptive hash indexes */
ibool srv_use_awe = FALSE;
ibool srv_use_adaptive_hash_indexes = TRUE;
/*-------------------------------------------*/ /*-------------------------------------------*/
ulong srv_n_spin_wait_rounds = 20; ulong srv_n_spin_wait_rounds = 20;
ulong srv_n_free_tickets_to_enter = 500; ulong srv_n_free_tickets_to_enter = 500;
...@@ -1244,17 +1235,7 @@ srv_normalize_init_values(void) ...@@ -1244,17 +1235,7 @@ srv_normalize_init_values(void)
srv_pool_size = srv_pool_size / (UNIV_PAGE_SIZE / 1024); srv_pool_size = srv_pool_size / (UNIV_PAGE_SIZE / 1024);
srv_awe_window_size = srv_awe_window_size / UNIV_PAGE_SIZE; srv_lock_table_size = 5 * srv_pool_size;
if (srv_use_awe) {
/* If we are using AWE we must save memory in the 32-bit
address space of the process, and cannot bind the lock
table size to the real buffer pool size. */
srv_lock_table_size = 20 * srv_awe_window_size;
} else {
srv_lock_table_size = 5 * srv_pool_size;
}
return(DB_SUCCESS); return(DB_SUCCESS);
} }
...@@ -1702,13 +1683,6 @@ srv_printf_innodb_monitor( ...@@ -1702,13 +1683,6 @@ srv_printf_innodb_monitor(
fprintf(file, "Dictionary memory allocated " ULINTPF "\n", fprintf(file, "Dictionary memory allocated " ULINTPF "\n",
dict_sys->size); dict_sys->size);
if (srv_use_awe) {
fprintf(file,
"In addition to that %lu MB of AWE memory allocated\n",
(ulong) (srv_pool_size
/ ((1024 * 1024) / UNIV_PAGE_SIZE)));
}
buf_print_io(file); buf_print_io(file);
fputs("--------------\n" fputs("--------------\n"
......
...@@ -1035,10 +1035,6 @@ innobase_start_or_create_for_mysql(void) ...@@ -1035,10 +1035,6 @@ innobase_start_or_create_for_mysql(void)
"InnoDB: !!!!!!!! UNIV_MEM_DEBUG switched on !!!!!!!!!\n"); "InnoDB: !!!!!!!! UNIV_MEM_DEBUG switched on !!!!!!!!!\n");
#endif #endif
#ifdef UNIV_SIMULATE_AWE
fprintf(stderr,
"InnoDB: !!!!!!!! UNIV_SIMULATE_AWE switched on !!!!!!!!!\n");
#endif
if (srv_sizeof_trx_t_in_ha_innodb_cc != (ulint)sizeof(trx_t)) { if (srv_sizeof_trx_t_in_ha_innodb_cc != (ulint)sizeof(trx_t)) {
fprintf(stderr, fprintf(stderr,
"InnoDB: Error: trx_t size is %lu in ha_innodb.cc" "InnoDB: Error: trx_t size is %lu in ha_innodb.cc"
...@@ -1077,21 +1073,6 @@ innobase_start_or_create_for_mysql(void) ...@@ -1077,21 +1073,6 @@ innobase_start_or_create_for_mysql(void)
srv_startup_is_before_trx_rollback_phase = TRUE; srv_startup_is_before_trx_rollback_phase = TRUE;
os_aio_use_native_aio = FALSE; os_aio_use_native_aio = FALSE;
#if !defined(__WIN2000__) && !defined(UNIV_SIMULATE_AWE)
if (srv_use_awe) {
fprintf(stderr,
"InnoDB: Error: You have specified"
" innodb_buffer_pool_awe_mem_mb\n"
"InnoDB: in my.cnf, but AWE can only"
" be used in Windows 2000 and later.\n"
"InnoDB: To use AWE, InnoDB must"
" be compiled with __WIN2000__ defined.\n");
return(DB_ERROR);
}
#endif
#ifdef __WIN__ #ifdef __WIN__
if (os_get_os_version() == OS_WIN95 if (os_get_os_version() == OS_WIN95
|| os_get_os_version() == OS_WIN31 || os_get_os_version() == OS_WIN31
...@@ -1249,25 +1230,7 @@ innobase_start_or_create_for_mysql(void) ...@@ -1249,25 +1230,7 @@ innobase_start_or_create_for_mysql(void)
fil_init(srv_max_n_open_files); fil_init(srv_max_n_open_files);
if (srv_use_awe) { ret = buf_pool_init(srv_pool_size, srv_pool_size);
fprintf(stderr,
"InnoDB: Using AWE: Memory window is %lu MB"
" and AWE memory is %lu MB\n",
(ulong) (srv_awe_window_size / ((1024 * 1024)
/ UNIV_PAGE_SIZE)),
(ulong) (srv_pool_size / ((1024 * 1024)
/ UNIV_PAGE_SIZE)));
/* We must disable adaptive hash indexes because they do not
tolerate remapping of pages in AWE */
srv_use_adaptive_hash_indexes = FALSE;
ret = buf_pool_init(srv_pool_size, srv_pool_size,
srv_awe_window_size);
} else {
ret = buf_pool_init(srv_pool_size, srv_pool_size,
srv_pool_size);
}
if (ret == NULL) { if (ret == NULL) {
fprintf(stderr, fprintf(stderr,
......
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