History log of /5.5.2/kv_engine/engines/ep/src/atomic.h (Results 1 - 25 of 76)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v7.0.2, v6.6.3, v7.0.1, v7.0.0, v6.6.2, v6.5.2, v6.6.1, v6.0.5, v6.6.0, v6.5.1, v6.0.4, v6.5.0, v6.0.3, v5.5.4, v5.5.5, v5.5.6, v6.0.1, v5.5.3, v6.0.0, v5.1.3, v5.5.2, v5.5.1, v5.1.2, v5.1.1
# 37b6ac98 08-Feb-2018 Trond Norbye <trond.norbye@gmail.com>

Clean up memcached/extension.h

The file includes a number of other (now) obsolete header
files (in addition to that we had a weird intentation).

Fix the missing includes in all

Clean up memcached/extension.h

The file includes a number of other (now) obsolete header
files (in addition to that we had a weird intentation).

Fix the missing includes in all of the other files caused
by removal of these files.

Change-Id: I1cebe8a1d956c161e0d9f218e478c5d1e9663ff1
Reviewed-on: http://review.couchbase.org/89063
Reviewed-by: Daniel Owen <owend@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 7169f224 04-Jan-2018 Daniel Owen <owend@couchbase.com>

MB-22010: Fix bool method of TaggedPtr

Experimenting setting a tag using a TaggedPtr within
SingleThreadedRCPtr identified an issue where the bool method of
TaggedPtr returns true if

MB-22010: Fix bool method of TaggedPtr

Experimenting setting a tag using a TaggedPtr within
SingleThreadedRCPtr identified an issue where the bool method of
TaggedPtr returns true if the tag is set, even if the pointer is zero.

This patches changes the TaggedPtr bool method to first clear the tag
before comparing it with zero. It also adds an associated test.

In addition, to make the code more uniform in SingleThreadedRCPtr, when
a pointer comparison is made it uses explict nullptr checks. It also
simplifies pointer checks in the Item class by invoking the
SingleThreadedRCPtr bool method.

Change-Id: I784162103cbe35c469f4de87625d29b8e91fa2e9
Reviewed-on: http://review.couchbase.org/87409
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


Revision tags: v5.0.1
# 46dc1225 08-Dec-2017 Dave Rigby <daver@couchbase.com>

Add exchange() & operator-- to LoggedAtomic<>

Add some additional methods to LoggedAtomic which were missing
(compared to std::atomic).

Also fix operator++() to correctly return

Add exchange() & operator-- to LoggedAtomic<>

Add some additional methods to LoggedAtomic which were missing
(compared to std::atomic).

Also fix operator++() to correctly return a T and not a reference.

Change-Id: Ia16e4999c548ee35593ada84efc2097effb11d73
Reviewed-on: http://review.couchbase.org/86583
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 9801c79e 05-Dec-2017 Daniel Owen <owend@couchbase.com>

MB-22010: [5/N] Implement Tagged Pointer for SingleThreadRCPtr

This patch modifies the SingleThreadedRCPtr class, to allow the
TaggedPtr class to be provided as the pointer type. This a

MB-22010: [5/N] Implement Tagged Pointer for SingleThreadRCPtr

This patch modifies the SingleThreadedRCPtr class, to allow the
TaggedPtr class to be provided as the pointer type. This allows
the reference count properities of SingleThreadedRCPtr to be combined
with the tagging properties of TaggedPtr.

Also adds a static helper method to TaggedPtr for setting the tag of
a TaggedPtr that is wrapped inside a Pointer, such as
SingleThreadedRCPtr.

Change-Id: I01b5696c52523fec35626ea18bc34b3c3ba9df9a
Reviewed-on: http://review.couchbase.org/86324
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# 7098d308 30-Nov-2017 Daniel Owen <owend@couchbase.com>

MB-22010: [3/N] Do not directly refer to a RCValue

As part of the TaggedPtr work we want SingleTheadedRCPtr to be applied
to a TaggedPtr. To achieve this we need to avoid the
Single

MB-22010: [3/N] Do not directly refer to a RCValue

As part of the TaggedPtr work we want SingleTheadedRCPtr to be applied
to a TaggedPtr. To achieve this we need to avoid the
SingleThreadedRCPtr using a static_cast to directly access a RCValue.

This patch introduces a getRCValue function that returns a reference to
a RCValue. This allows all the static_cast<RCValue*> to be removed
from the RCPtr and SingleThreadedRCPtr classes.

Change-Id: I1327a8069b9fa0f7857af959126708c456a34162
Reviewed-on: http://review.couchbase.org/86182
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 8f1b9af4 29-Nov-2017 Dave Rigby <daver@couchbase.com>

MB-26021: SingleThreadedRCPtr: implement Swappable concept

Make SingleThreadedRCPtr support Swappable[1]. This allows std::sort
(and other algorithms to exchange two STRCPtrs without mod

MB-26021: SingleThreadedRCPtr: implement Swappable concept

Make SingleThreadedRCPtr support Swappable[1]. This allows std::sort
(and other algorithms to exchange two STRCPtrs without modifying the
refcounts.

Running a benchmark using CompareQueuedItemsBySeqnoAndKey as a
comparator, shows a 8% reduction in runtime:

Before:
Run on (8 X 2300 MHz CPU s)
2017-11-29 13:16:39
--------------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------------
BM_CompareQueuedItemsBySeqnoAndKey 2625473 ns 2623663 ns 282

After:

Run on (8 X 2300 MHz CPU s)
2017-11-29 13:45:51
--------------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------------
BM_CompareQueuedItemsBySeqnoAndKey 2418255 ns 2417758 ns 285

[1]: http://en.cppreference.com/w/cpp/concept/Swappable

Change-Id: I582c2b37d32a20516cecb9cc3200e42dbc6c90b4
Reviewed-on: http://review.couchbase.org/86125
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>

show more ...


# 568357e7 29-Nov-2017 Dave Rigby <daver@couchbase.com>

MB-26021: SingleThreadedRCPtr: Add move-{assignment,construction} operators

Allows std::sort to optimize swapping items in a container of RCPtrs.

Running a benchmark using CompareQu

MB-26021: SingleThreadedRCPtr: Add move-{assignment,construction} operators

Allows std::sort to optimize swapping items in a container of RCPtrs.

Running a benchmark using CompareQueuedItemsBySeqnoAndKey as a comparator, shows
a 22% reduction in runtime:

Before:
Run on (8 X 2300 MHz CPU s)
2017-11-28 15:48:54
--------------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------------
BM_CompareQueuedItemsBySeqnoAndKey 3368195 ns 3365729 ns 221

After:
Run on (8 X 2300 MHz CPU s)
2017-11-29 13:16:39
--------------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------------
BM_CompareQueuedItemsBySeqnoAndKey 2625473 ns 2623663 ns 282

Change-Id: I1a55be2d299366d10cd8e2277e1cf571ec4a583e
Reviewed-on: http://review.couchbase.org/86124
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>

show more ...


Revision tags: v5.1.0, v5.0.0
# ef22f9b0 25-May-2017 Dave Rigby <daver@couchbase.com>

Move ep-engine to engines/ep


# 27ea3fea 19-Apr-2017 olivermd <oliver.downard@couchbase.com>

MB-23263: DefragmenterVisitor: Check blob refcount

This patch adds the facility to check the refcount value of a
SingleThreadedRCPTR and uses this to ensure that the refcount of the

MB-23263: DefragmenterVisitor: Check blob refcount

This patch adds the facility to check the refcount value of a
SingleThreadedRCPTR and uses this to ensure that the refcount of the
blob is less than 2 before the defragmenter reallocates it. This is to
ensure that we do not end up just creating a copy of the blob thus
increasing memory usage which would be the opposite of what you would
expect from the defragmenter.

It's worth noting that it appears as though something could create
another reference to the blob without holding the hashtable lock. This
could lead to a soft data race on the refcount. This means that we
cannot give a hard guarantee that the defragmenter doesn't duplicate the
blob, just that it will in most cases. The case where it won't will be
where the other thing creating the reference doesn't hold the hash
bucket lock and happens to create a reference after refcount is read but
before the blob is reallocated, which seems rare.

Change-Id: I3a8b8812ac039445451952384cb5b40ce8b433cb
Reviewed-on: http://review.couchbase.org/76958
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# 4a1704d4 05-Apr-2017 Dave Rigby <daver@couchbase.com>

RCPtr: Add dynamic_pointer_cast

Allows dynamic cast from one RCPtr instantiation to another. Based on
same function for std::shared_ptr.

Change-Id: Idc8723ea90dfd2843a3c5b602f5e

RCPtr: Add dynamic_pointer_cast

Allows dynamic cast from one RCPtr instantiation to another. Based on
same function for std::shared_ptr.

Change-Id: Idc8723ea90dfd2843a3c5b602f5e42fad7a36613
Reviewed-on: http://review.couchbase.org/76552
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: James Harrison <james.harrison@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>

show more ...


Revision tags: v4.6.2_ep
# 0bc70e5b 15-Mar-2017 Dave Rigby <daver@couchbase.com>

SingleThreadedRCPtr: Add move constructor from unique_ptr<>

Add a move constructor to SingleThreadedRCPtr which allows moving from
a unique_ptr. This improves interopability between our

SingleThreadedRCPtr: Add move constructor from unique_ptr<>

Add a move constructor to SingleThreadedRCPtr which allows moving from
a unique_ptr. This improves interopability between our custom
ref-counted ptr and unique_ptr.

Change-Id: Ib0a2caf532ec525260b2713868ed001f5d1f5eae
Reviewed-on: http://review.couchbase.org/75215
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>
Reviewed-by: Manu Dhundi <manu@couchbase.com>

show more ...


Revision tags: v4.6.2_mc, v4.6.1_ep
# 11d62689 09-Feb-2017 Dave Rigby <daver@couchbase.com>

Cleanup #include usage in headers

'Include what you use':

- remove unnecessary #include directives from source files, focusing
on removing from header files (where they can ca

Cleanup #include usage in headers

'Include what you use':

- remove unnecessary #include directives from source files, focusing
on removing from header files (where they can cause unnecessary
rebuilding.

- Move #includes from .h to .cc where applicable.

- Use forward declarions instead of #include'ing the whole header
where possible.

- Remove unnecessary inlining of non-hot / non-trivial code by moving
to .cc files.

Change-Id: I35a757fe92e637ce47454ef84332e89ec94937d3
Reviewed-on: http://review.couchbase.org/73457
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>

show more ...


# de19498a 24-Jan-2017 olivermd <oliver.downard@couchbase.com>

MB-22015: Replace new with make_STRCptr in warmup

Provides the nessecary copy constructor to allow for an implicit
conversion from SingleThreadedRCPtr<Derived> to
SingleThreadedRCPtr

MB-22015: Replace new with make_STRCptr in warmup

Provides the nessecary copy constructor to allow for an implicit
conversion from SingleThreadedRCPtr<Derived> to
SingleThreadedRCPtr<Base>.

Adds a make_STRCptr function to allow for the creation of
SingleThreadedRCPtrs in a way that avoids directly using 'new'.

Change-Id: I9d7359fa691bce1d8e1164e9dee505b1a6232231
Reviewed-on: http://review.couchbase.org/72404
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


# f3dcd5be 22-Dec-2016 Manu Dhundi <manu@couchbase.com>

LoggedAtomic: Add compare_exchange_strong() and pre-increment operator

Change-Id: I18ed43a8fd4f2691afa6e42c49a85fb0d9fcfc05
Reviewed-on: http://review.couchbase.org/71099
Reviewed-by

LoggedAtomic: Add compare_exchange_strong() and pre-increment operator

Change-Id: I18ed43a8fd4f2691afa6e42c49a85fb0d9fcfc05
Reviewed-on: http://review.couchbase.org/71099
Reviewed-by: Manu Dhundi <manu@couchbase.com>
Tested-by: buildbot <build@couchbase.com>

show more ...


Revision tags: v4.6.0_ep
# b028e804 28-Nov-2016 WillGardner <willg@rdner.io>

Convert SpinLock to BasicLockable, remove SpinLockHolder

This patch adjusts SpinLock to allow to implement BasicLockable
allowing it to be locked by a std::lock_guard. Also removes
S

Convert SpinLock to BasicLockable, remove SpinLockHolder

This patch adjusts SpinLock to allow to implement BasicLockable
allowing it to be locked by a std::lock_guard. Also removes
SpinLockHolder and converts all uses to std::lock_guard (Just an
alias wouldn't work as SpinLockHolder passes by pointer rather
than reference).

Change-Id: Ic415407d3f10da188482b720adb48cb475c8decb
Reviewed-on: http://review.couchbase.org/70405
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v4.5.1-MP1_mc, v4.6.0-DP_mc, v4.6.0-DP_ep
# 2252bb7a 19-Oct-2016 Dave Rigby <daver@couchbase.com>

LoggedAtomic: Expand set of operations supported, serialize logging

Add support for increment & decrement (fetch_{add,sub}), assignment
and conversion to T.

Also add a mutex to

LoggedAtomic: Expand set of operations supported, serialize logging

Add support for increment & decrement (fetch_{add,sub}), assignment
and conversion to T.

Also add a mutex to serialize access to stderr, to prevent corruption
in log messages.

Change-Id: I0a617f702a22d287fb87bd1001ee0300b6551b9e
Reviewed-on: http://review.couchbase.org/69009
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Will Gardner <willg@rdner.io>

show more ...


# dd3e745f 23-Sep-2016 Dave Rigby <daver@couchbase.com>

Add LoggedAtomic<> debug class

A Debugging wrapper around std::atomic which print all accesses to the
atomic value to stderr.

Drop-in compatible with AtomicValue for simple use-

Add LoggedAtomic<> debug class

A Debugging wrapper around std::atomic which print all accesses to the
atomic value to stderr.

Drop-in compatible with AtomicValue for simple use-cases - currently
only implements load() / store().

Change-Id: I78cec4d8bad55588900573f201d81a38f16f97ee
Reviewed-on: http://review.couchbase.org/67944
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Daniel Owen <owend@couchbase.com>

show more ...


Revision tags: v4.5.1-MP1_ep, v4.1.2-MP2_mc, v4.5.1_mc, v4.6.0_mc, v4.1.2-MP1_ep, v3.1.6_ep, v4.5.0_mc, v4.5.0_ep, v4.1.1_ep, v3.1.5_ep, v4.1.1_mc
# 66bb41ad 04-Mar-2016 Dave Rigby <daver@couchbase.com>

Remove AtomicValue and Mutex defines

We already removed our own custom AtomicValue and Mutex classes when
we moved to C++11; replacing them with #defines to std::atomic and
std::mute

Remove AtomicValue and Mutex defines

We already removed our own custom AtomicValue and Mutex classes when
we moved to C++11; replacing them with #defines to std::atomic and
std::mutex respectively. This patch completes that changover, using
the underlying types directly so it's easier to see what is actually
being used.

Change-Id: If3f717f766727042cd81ae7b8c65f9a19934f2fa
Reviewed-on: http://review.couchbase.org/60925
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>

show more ...


Revision tags: v3.1.4_ep, v3.1.4_mc, v3.1.5_mc, v3.1.3_ep, v4.1.0_ep
# 44137813 05-Nov-2015 Dave Rigby <daver@couchbase.com>

Simplify common.h: add utility.h [2/3]

Create a new utility.h header file and move some of the functions /
macros which virtually everyone uses to there. utility.h has
significantly

Simplify common.h: add utility.h [2/3]

Create a new utility.h header file and move some of the functions /
macros which virtually everyone uses to there. utility.h has
significantly fewer dependancies, and such is much cheaper to include
than common.h

Update users of these functions / macros (DISALLOW_COPY_ON_ASSIGN, LOG
etc) to use utility.h instead of common.h

Change-Id: I3f93435c82950bd2a20b416af2b2e5011a931e04
Reviewed-on: http://review.couchbase.org/56704
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


Revision tags: v3.1.2_ep, v4.1.0_mc, v3.1.2_mc, v3.1.1_mc, v3.1.1_ep, v4.0.0_ep, v4.0.0_mc, v3.1.0_ep, v3.1.0_mc, v3.1.6_mc
# daa227e6 11-Jun-2015 Dave Rigby <daver@couchbase.com>

MB-15292: Make CouchbaseAtomic::store() atomic

As identified by ThreadSantizer:

WARNING: ThreadSanitizer: data race (pid=59833)
Write of size 8 at 0x7d240000d3f0 by thread T8:

MB-15292: Make CouchbaseAtomic::store() atomic

As identified by ThreadSantizer:

WARNING: ThreadSanitizer: data race (pid=59833)
Write of size 8 at 0x7d240000d3f0 by thread T8:
#0 CouchbaseAtomic<unsigned long>::store(unsigned long const&, memory_order) /root/couchbase-3.0/ep-engine/src/atomic.h:84 (ep.so+0x0000000414ef)
#1 CouchbaseAtomic<unsigned long>::operator=(unsigned long const&) /root/couchbase-3.0/ep-engine/src/atomic.h:105 (ep.so+0x0000000401f5)
#2 Warmup::scheduleEstimateDatabaseItemCount() /root/couchbase-3.0/ep-engine/src/warmup.cc:500 (ep.so+0x000000277991)
#3 Warmup::step() /root/couchbase-3.0/ep-engine/src/warmup.cc:816 (ep.so+0x000000275124)
#4 Warmup::transition(int, bool) /root/couchbase-3.0/ep-engine/src/warmup.cc:853 (ep.so+0x0000002754ff)
#5 Warmup::createVBuckets(unsigned short) /root/couchbase-3.0/ep-engine/src/warmup.cc:491 (ep.so+0x00000027785f)
#6 WarmupCreateVBuckets::run() /root/couchbase-3.0/ep-engine/src/warmup.h:234 (ep.so+0x00000028cde9)
#7 ExecutorThread::run() /root/couchbase-3.0/ep-engine/src/executorthread.cc:110 (ep.so+0x0000001a2581)
#8 launch_executor_thread(void*) /root/couchbase-3.0/ep-engine/src/executorthread.cc:34 (ep.so+0x0000001a1a5a)
#9 platform_thread_wrap /root/couchbase-3.0/platform/src/cb_pthreads.c:19 (libplatform.so.0.1.0+0x000000002f14)

Previous atomic write of size 8 at 0x7d240000d3f0 by main thread (mutexes: write M670470284968504712):
#0 __tsan_atomic64_fetch_add <null>:0 (engine_testapp+0x00000008cb48)
#1 CouchbaseAtomic<unsigned long>::load(memory_order) const /root/couchbase-3.0/ep-engine/src/atomic.h:77 (ep.so+0x0000000446b4)
#2 CouchbaseAtomic<unsigned long>::operator unsigned long() const /root/couchbase-3.0/ep-engine/src/atomic.h:101 (ep.so+0x000000044575)
#3 Warmup::addStats(void (*)(char const*, unsigned short, char const*, unsigned int, void const*), void const*) const /root/couchbase-3.0/ep-engine/src/warmup.cc:901 (ep.so+0x00000027d4ea)
#4 EventuallyPersistentEngine::getStats(void const*, char const*, int, void (*)(char const*, unsigned short, char const*, unsigned int, void const*)) /root/couchbase-3.0/ep-engine/src/ep_engine.cc:4405 (ep.so+0x0000001155a9)
#5 EvpGetStats(engine_interface*, void const*, char const*, int, void (*)(char const*, unsigned short, char const*, unsigned int, void const*)) /root/couchbase-3.0/ep-engine/src/ep_engine.cc:214 (ep.so+0x0000000fa102)
#6 mock_get_stats /root/couchbase-3.0/memcached/programs/engine_testapp/engine_testapp.c:194 (engine_testapp+0x0000000aeecd)
#7 wait_for_warmup_complete(engine_interface*, engine_interface_v1*) /root/couchbase-3.0/ep-engine/tests/ep_test_apis.cc:864 (ep_perfsuite.so+0x00000001b1cb)
#8 test_setup(engine_interface*, engine_interface_v1*) /root/couchbase-3.0/ep-engine/tests/ep_testsuite_common.cc:128 (ep_perfsuite.so+0x00000000dc03)
#9 execute_test /root/couchbase-3.0/memcached/programs/engine_testapp/engine_testapp.c:1037 (engine_testapp+0x0000000ab85a)
#10 main /root/couchbase-3.0/memcached/programs/engine_testapp/engine_testapp.c:1296 (engine_testapp+0x0000000a9a19)

Change-Id: I260942712ca471c0d2e0fa3ebc4793d694f9b237
Reviewed-on: http://review.couchbase.org/51973
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


# 03384fe0 11-Jun-2015 Dave Rigby <daver@couchbase.com>

MB-15292: Make CouchbaseAtomic::load() atomic

Identified by ThreadSanitizer running ep_perfsuite.so:

WARNING: ThreadSanitizer: data race (pid=51118)
Atomic write of size 1 at

MB-15292: Make CouchbaseAtomic::load() atomic

Identified by ThreadSanitizer running ep_perfsuite.so:

WARNING: ThreadSanitizer: data race (pid=51118)
Atomic write of size 1 at 0x7d4400009d58 by main thread (mutexes: write M5599):
#0 __tsan_atomic8_compare_exchange_val <null>:0 (engine_testapp+0x000000093f50)
#1 CouchbaseAtomic<bool>::compare_exchange_strong(bool&, bool, memory_order) /root/couchbase-3.0/ep-engine/src/atomic.h:92 (ep.so+0x00000005575d)
#2 Flusher::notifyFlushEvent() /root/couchbase-3.0/ep-engine/src/flusher.h:88 (ep.so+0x0000000c6fec)
#3 EventuallyPersistentStore::queueDirty(RCPtr<VBucket>&, StoredValue*, LockHolder*, bool, bool, bool) /root/couchbase-3.0/ep-engine/src/ep.cc:2826 (ep.so+0x00000009c796)
#4 EventuallyPersistentStore::add(Item const&, void const*) /root/couchbase-3.0/ep-engine/src/ep.cc:728 (ep.so+0x00000009f673)
#5 EventuallyPersistentEngine::store(void const*, void*, unsigned long*, ENGINE_STORE_OPERATION, unsigned short) /root/couchbase-3.0/ep-engine/src/ep_engine.cc:2135 (ep.so+0x000000100980)
#6 EvpStore(engine_interface*, void const*, void*, unsigned long*, ENGINE_STORE_OPERATION, unsigned short) /root/couchbase-3.0/ep-engine/src/ep_engine.cc:229 (ep.so+0x0000000fa21d)
#7 mock_store /root/couchbase-3.0/memcached/programs/engine_testapp/engine_testapp.c:227 (engine_testapp+0x0000000ade2e)
#8 storeCasVb11(engine_interface*, engine_interface_v1*, void const*, ENGINE_STORE_OPERATION, char const*, char const*, unsigned long, unsigned int, void**, unsigned long, unsigned short, unsigned int, unsigned char) /root/couchbase-3.0/ep-engine/tests/ep_test_apis.cc:654 (ep_perfsuite.so+0x000000018ec3)
#9 perf_latency(engine_interface*, engine_interface_v1*, char const*) /root/couchbase-3.0/ep-engine/tests/ep_perfsuite.cc:104 (ep_perfsuite.so+0x0000000097e2)
#10 perf_latency_baseline(engine_interface*, engine_interface_v1*) /root/couchbase-3.0/ep-engine/tests/ep_perfsuite.cc:169 (ep_perfsuite.so+0x0000000090b7)
#11 execute_test /root/couchbase-3.0/memcached/programs/engine_testapp/engine_testapp.c:1042 (engine_testapp+0x0000000ab933)
#12 main /root/couchbase-3.0/memcached/programs/engine_testapp/engine_testapp.c:1296 (engine_testapp+0x0000000a9a19)

Previous read of size 1 at 0x7d4400009d58 by thread T20:
#0 CouchbaseAtomic<bool>::load(memory_order) const /root/couchbase-3.0/ep-engine/src/atomic.h:79 (ep.so+0x00000005288c)
#1 Flusher::canSnooze() /root/couchbase-3.0/ep-engine/src/flusher.h:104 (ep.so+0x00000018e92b)
#2 Flusher::computeMinSleepTime() /root/couchbase-3.0/ep-engine/src/flusher.cc:239 (ep.so+0x00000018dc87)
#3 Flusher::step(GlobalTask*) /root/couchbase-3.0/ep-engine/src/flusher.cc:187 (ep.so+0x00000018cb35)

Change-Id: Ie32ca8fa4e662e1244362cbdb0cb2573f80665e2
Reviewed-on: http://review.couchbase.org/51968
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Jim Walker <jim@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


Revision tags: v3.0.2-MP2_mc
# 97989953 03-Dec-2014 Dave Rigby <daver@couchbase.com>

MB-13350: Remove pre-C++11 atomic support

For all subsequent releases we require C++11 support; which includes
the std::atomic library. Therefore remove our home-grown
CouchbaseAtomi

MB-13350: Remove pre-C++11 atomic support

For all subsequent releases we require C++11 support; which includes
the std::atomic library. Therefore remove our home-grown
CouchbaseAtomic class and related atomic implementation

Change-Id: Idebea50b65b49bf7aff2b7f321016e5c29ddd477
Reviewed-on: http://review.couchbase.org/43908
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


Revision tags: v3.0.2_ep, v3.0.2_mc
# c7dbf39f 11-Nov-2014 Mike Wiederhold <mike@couchbase.com>

The atomic queue shouldn't use a different atomic class

Even if we're have c++11 atomics the atomic queue would use the
old atomic code. This change makes sure that we use a single
i

The atomic queue shouldn't use a different atomic class

Even if we're have c++11 atomics the atomic queue would use the
old atomic code. This change makes sure that we use a single
implementation.

Change-Id: Ibf315ece1f34c719e6ff6309d3e9fc68668c1d89
Reviewed-on: http://review.couchbase.org/43073
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>

show more ...


Revision tags: v3.0.1_mc, v3.0.0_ep, v3.0.0-beta3_mc, v3.0.0_mc, v3.0.0-beta2_mc, v3.0.0-beta1_mc
# 2feed4f1 06-Jun-2014 Sundar Sridharan <sundar.sridharan@gmail.com>

MB-11287 Lower default atomic operation ordering

Lowering global default memory ordering stringency to
memory_order_acq_rel to avoid costly CPU fence operations

Change-Id: Ic8f1

MB-11287 Lower default atomic operation ordering

Lowering global default memory ordering stringency to
memory_order_acq_rel to avoid costly CPU fence operations

Change-Id: Ic8f14abc7843f931242c61ba98c5cc667f52023d
Reviewed-on: http://review.couchbase.org/37981
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Tested-by: Sundararaman Sridharan <sundar@couchbase.com>

show more ...


# 060af666 06-Jun-2014 Sundar Sridharan <sundar.sridharan@gmail.com>

MB-11287 use less stringent memory_order for TaskQueue lock

The default memory_order for the atomic variable isLock in
TaskQueue is sequential ordering which imposes severe CPU
fence

MB-11287 use less stringent memory_order for TaskQueue lock

The default memory_order for the atomic variable isLock in
TaskQueue is sequential ordering which imposes severe CPU
fence and results in high CPU usage on machines with many cores.

The acquire-release ordering should offer a balanced mix of
ordering and performance for this use-case.
http://en.cppreference.com/w/cpp/atomic/memory_order

Change-Id: Ida12cfaf428b725f5a960f4f34e527f548e01c91
Reviewed-on: http://review.couchbase.org/37976
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>

show more ...


1234