Skip to content

Commit bdbb807

Browse files
committed
fix bugs
1 parent 5f6e086 commit bdbb807

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

build_mysql.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ IS_DEBUG=0
1111
#BUILD_NAME="-DUNIV_PMEMOBJ_WAL -DUNIV_TRACE_FLUSH_TIME"
1212
#BUILD_NAME="-DUNIV_PMEMOBJ_WAL -DUNIV_PMEMOBJ_WAL_ELR -DUNIV_TRACE_FLUSH_TIME"
1313
#BUILD_NAME="-DUNIV_NVM_LOG -DUNIV_PMEMOBJ_WAL -DUNIV_TRACE_FLUSH_TIME"
14-
#BUILD_NAME="-DUNIV_PMEMOBJ_PERSIST -DUNIV_PMEMOBJ_PPL_STAT -DUNIV_PMEMOBJ_PAGE_LOG -DUNIV_PMEMOBJ_PART_PL -DUNIV_PMEMOBJ_PL -DUNIV_TRACE_RECOVERY_TIME"
14+
#BUILD_NAME="-DUNIV_PMEMOBJ_PERSIST -DUNIV_PMEMOBJ_PPL_STAT -DUNIV_PMEMOBJ_PAGE_LOG -DUNIV_PMEMOBJ_PART_PL -DUNIV_PMEMOBJ_PL -DUNIV_TRACE_RECOVERY_TIME" #benchmark
1515
#BUILD_NAME="-DUNIV_PMEMOBJ_PERSIST -DUNIV_PMEMOBJ_PPL_STAT -DUNIV_PMEMOBJ_PAGE_LOG -DUNIV_PMEMOBJ_PART_PL -DUNIV_PMEMOBJ_PART_PL_DEBUG -DUNIV_PMEMOBJ_PL -DUNIV_TRACE_FLUSH_TIME"
1616
#######################################
1717

1818
##### Simulate latency PL-NVM######################
19-
BUILD_NAME="-DUNIV_PMEM_SIM_LATENCY -DUNIV_PMEMOBJ_PERSIST -DUNIV_PMEMOBJ_PPL_STAT -DUNIV_PMEMOBJ_PAGE_LOG -DUNIV_PMEMOBJ_PART_PL -DUNIV_PMEMOBJ_PL -DUNIV_TRACE_RECOVERY_TIME"
19+
#BUILD_NAME="-DUNIV_PMEM_SIM_LATENCY -DUNIV_PMEMOBJ_PERSIST -DUNIV_PMEMOBJ_PPL_STAT -DUNIV_PMEMOBJ_PAGE_LOG -DUNIV_PMEMOBJ_PART_PL -DUNIV_PMEMOBJ_PL -DUNIV_TRACE_RECOVERY_TIME"
2020

2121
#NO TX no persist less, use for simulation latency
2222
#BUILD_NAME="-DUNIV_PMEM_SIM_LATENCY -DUNIV_PMEMOBJ_NO_TX -DUNIV_OPENMP -DUNIV_PMEMOBJ_BLOOM -DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_PARTITION -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_TRACE_FLUSH_TIME"
@@ -89,7 +89,8 @@ BUILD_NAME="-DUNIV_PMEM_SIM_LATENCY -DUNIV_PMEMOBJ_PERSIST -DUNIV_PMEMOBJ_PPL_ST
8989
## EVEN + BLOOM
9090
#BUILD_NAME="-DUNIV_OPENMP -DUNIV_PMEMOBJ_BLOOM -DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME"
9191
## LESS + BLOOM
92-
#BUILD_NAME="-DUNIV_OPENMP -DUNIV_PMEMOBJ_BLOOM -DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_PARTITION -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME"
92+
BUILD_NAME="-DUNIV_OPENMP -DUNIV_PMEMOBJ_BLOOM -DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_PARTITION -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY"
93+
#BUILD_NAME="-DUNIV_OPENMP -DUNIV_PMEMOBJ_BLOOM -DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_BUF_PARTITION -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_PMEMOBJ_BUF_RECOVERY -DUNIV_PMEMOBJ_BUF_STAT -DUNIV_TRACE_FLUSH_TIME" # Paper writing
9394

9495
#LSB
9596
#BUILD_NAME="-DUNIV_PMEMOBJ_BUF -DUNIV_PMEMOBJ_LSB -DUNIV_PMEMOBJ_BUF_FLUSHER -DUNIV_TRACE_FLUSH_TIME"

storage/innobase/buf/buf0flu.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -5072,7 +5072,9 @@ DECLARE_THREAD(pm_buf_flush_list_cleaner_coordinator)(
50725072
D_RW(gb_pmw->pbuf->spec_list)->cur_pages);
50735073

50745074
//pm_bloom_stats(gb_pmw->pbuf->bf);
5075-
pm_cbf_stats(gb_pmw->pbuf->cbf);
5075+
5076+
/*print the BloomFilter stat info*/
5077+
//pm_cbf_stats(gb_pmw->pbuf->cbf);
50765078
#else
50775079
printf("cur free list = %zu, cur spec_list = %zu\n",
50785080
D_RW(gb_pmw->pbuf->free_pool)->cur_lists,

storage/innobase/ibuf/ibuf0ibuf.cc

-3
Original file line numberDiff line numberDiff line change
@@ -2127,9 +2127,6 @@ ibuf_remove_free_page(void)
21272127
pages from the free list, but they take them from the start, and
21282128
the free list was so long that they cannot have taken the last
21292129
page from it. */
2130-
//#if defined (UNIV_PMEMOBJ_PART_PL)
2131-
// printf("ibuf_remove_free_page() page (%zu, %zu)\n", IBUF_SPACE_ID, page_no);
2132-
//#endif
21332130
fseg_free_page(header_page + IBUF_HEADER + IBUF_TREE_SEG_HEADER,
21342131
IBUF_SPACE_ID, page_no, false, &mtr);
21352132

storage/innobase/mtr/mtr0mtr.cc

+15-6
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ extern volatile int64 gb_write_log_time;
4444
extern volatile int64 gb_n_write_log;
4545
#endif
4646

47-
#if defined (UNIV_PMEMOBJ_PART_PL) || defined (UNIV_PMEMOBJ_WAL_ELR)
47+
#if defined (UNIV_PMEMOBJ_PART_PL) || defined (UNIV_PMEMOBJ_WAL_ELR) || defined(UNIV_PMEMOBJ_WAL)
4848
#include "my_pmemobj.h"
4949
extern PMEM_WRAPPER* gb_pmw;
5050
#endif /* UNIV_PMEMOBJ_PART_PL */
@@ -1369,7 +1369,7 @@ mtr_t::Command::execute()
13691369
#endif
13701370
}
13711371

1372-
#else //old method
1372+
#else //old method for UNIV_SKIPLOG
13731373

13741374
// In PL-NVM, we keep log records in our data structure
13751375
// This function just release the resource without writing any logs
@@ -1410,8 +1410,9 @@ mtr_t::Command::execute()
14101410
release_resources();
14111411
}
14121412
#endif //UNIV_PMEMOBJ_PART_PL
1413-
#elif defined (UNIV_PMEMOBJ_WAL) && defined (UNIV_PMEMOBJ_WAL_ELR)
1414-
//Early lock release
1413+
//#elif defined (UNIV_PMEMOBJ_WAL) && defined (UNIV_PMEMOBJ_WAL_ELR)
1414+
#elif defined (UNIV_PMEMOBJ_WAL)
1415+
//Centralized logging methods: regular or Early lock release
14151416
void
14161417
mtr_t::Command::execute()
14171418
{
@@ -1596,7 +1597,10 @@ mtr_t::Command::execute()
15961597
#if defined(UNIV_PMEMOBJ_LOG) || defined(UNIV_PMEMOBJ_WAL)
15971598
// update the lsn and buf_free
15981599
gb_pmw->plogbuf->lsn = log->lsn;
1600+
pmemobj_persist(gb_pmw->pop, &gb_pmw->plogbuf->lsn, sizeof(gb_pmw->plogbuf->lsn));
1601+
15991602
gb_pmw->plogbuf->buf_free = log->buf_free;
1603+
pmemobj_persist(gb_pmw->pop, &gb_pmw->plogbuf->buf_free, sizeof(gb_pmw->plogbuf->buf_free));
16001604
#endif /*UNIV_PMEMOBJ_LOG */
16011605
srv_stats.log_write_requests.inc();
16021606

@@ -1611,21 +1615,26 @@ mtr_t::Command::execute()
16111615
if (m_impl->m_made_dirty) {
16121616
log_flush_order_mutex_enter();
16131617
}
1614-
1618+
#if defined (UNIV_PMEMOBJ_WAL_ELR)
16151619
/* It is now safe to release the log mutex because the
16161620
flush_order mutex will ensure that we are the first one
16171621
to insert into the flush list. */
16181622
log_mutex_exit();
1623+
#endif //UNIV_PMEMOBJ_WAL_ELR
16191624

16201625
//now we do the memcpy
16211626
TX_BEGIN(gb_pmw->pop) {
16221627
TX_MEMCPY(start_cpy, start_log_ptr, len_cpy);
16231628
} TX_ONABORT {
16241629
} TX_END
1630+
16251631
gb_pmw->plogbuf->need_recv = true;
1632+
pmemobj_persist(gb_pmw->pop, &gb_pmw->plogbuf->need_recv, sizeof(gb_pmw->plogbuf->need_recv));
16261633

16271634
m_impl->m_mtr->m_commit_lsn = m_end_lsn;
1628-
1635+
#if !defined(UNIV_PMEMOBJ_WAL_ELR)
1636+
log_mutex_exit();
1637+
#endif
16291638
release_blocks();
16301639

16311640
if (m_impl->m_made_dirty) {

0 commit comments

Comments
 (0)