remove flushes and fences from coupled to messure opportunity of new log structure idea

parent 7c2a91ca
......@@ -181,12 +181,16 @@ bool LogMgr::tryLogElision(void *addr, size_t sz)
assert(TL_FaseFlushPtr_);
collectCacheLines(TL_FaseFlushPtr_, addr, sz);
#endif
// if (!doesNeedLogging(addr, sz)) {
//#ifdef NVM_STATS
// Stats_->incrementUnloggedStoreCount();
//#endif
// return true;
// }
if (!doesNeedLogging(addr, sz)) {
#ifdef NVM_STATS
Stats_->incrementUnloggedStoreCount();
#endif
return true;
}
#ifdef NVM_STATS
if (!TL_NumHeldLocks_) Stats_->incrementLogElisionFailCount();
#endif
......
......@@ -63,9 +63,12 @@ void LogMgr::pruneLogEntries()
///
void LogMgr::publishLogEntry(LogEntry *le)
{
#ifdef _FORCE_FAIL
fail_program();
#endif
return;
// if TL_LastLogEntry_ is null, it means that this is the first
// log entry created in this thread. In that case, allocate space
// for the thread-specific header, set a pointer to this log entry,
......@@ -177,13 +180,13 @@ void LogMgr::finishAcquire(void *lock_address, LogEntry *le)
if (TL_NumHeldLocks_ > 1) Stats_->incrementNestedCriticalSectionCount();
#endif
publishLogEntry(le);
////s publishLogEntry(le);
// TL_LastLogEntry_ = le;
flushAtEndOfFase();
full_fence();
//flush and delete the logs now
pruneLogEntries();
full_fence();
////s pruneLogEntries();
////s full_fence();
}
......@@ -196,7 +199,7 @@ void LogMgr::finishRelease(LogEntry *le, const MapOfLockInfo& undo_locks)
assert(TL_NumHeldLocks_ > 0);
-- TL_NumHeldLocks_;
publishLogEntry(le);
////s publishLogEntry(le);
// TL_LastLogEntry_ = le;
......@@ -204,8 +207,8 @@ void LogMgr::finishRelease(LogEntry *le, const MapOfLockInfo& undo_locks)
flushAtEndOfFase();
full_fence();
//flush and delete the logs now
pruneLogEntries();
full_fence();
////s pruneLogEntries();
////s full_fence();
// if (!TL_NumHeldLocks_) markEndFase(le);
}
......
......@@ -142,6 +142,7 @@ void nvm_log_free(void *addr)
void nvm_barrier(void *p)
{
return;
if (!NVM_IsInOpenPR(p, 1)) return;
#if (!defined(DISABLE_FLUSHES) && !defined(_DISABLE_DATA_FLUSH))
full_fence();
......@@ -158,6 +159,7 @@ void nvm_barrier(void *p)
void nvm_psync(void *start_addr, size_t sz)
{
assert(Atlas::LogMgr::hasInstance());
return;
Atlas::LogMgr::getInstance().psync(start_addr, sz);
}
......@@ -166,6 +168,7 @@ void nvm_psync(void *start_addr, size_t sz)
void nvm_psync_acq(void *start_addr, size_t sz)
{
assert(Atlas::LogMgr::hasInstance());
return;
Atlas::LogMgr::getInstance().psyncWithAcquireBarrier(start_addr, sz);
}
......
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