Merge "bufferpool@2.0 tune eviction params" into qt-qpr1-dev am: aa700c13de am: 671c76ffd6

am: 0b578c697d

Change-Id: I1897491419bccde6b881fb791dd5d065d6172462
gugelfrei
Sungtak Lee 5 years ago committed by android-build-merger
commit 2b11dd1221

@ -38,7 +38,7 @@ namespace {
static constexpr int64_t kLogDurationUs = 5000000; // 5 secs static constexpr int64_t kLogDurationUs = 5000000; // 5 secs
static constexpr size_t kMinAllocBytesForEviction = 1024*1024*15; static constexpr size_t kMinAllocBytesForEviction = 1024*1024*15;
static constexpr size_t kMinBufferCountForEviction = 40; static constexpr size_t kMinBufferCountForEviction = 25;
} }
// Buffer structure in bufferpool process // Buffer structure in bufferpool process
@ -723,8 +723,8 @@ void Accessor::Impl::BufferPool::cleanUp(bool clearCache) {
mStats.mTotalFetches, mStats.mTotalTransfers); mStats.mTotalFetches, mStats.mTotalTransfers);
} }
for (auto freeIt = mFreeBuffers.begin(); freeIt != mFreeBuffers.end();) { for (auto freeIt = mFreeBuffers.begin(); freeIt != mFreeBuffers.end();) {
if (!clearCache && mStats.mSizeCached < kMinAllocBytesForEviction if (!clearCache && (mStats.mSizeCached < kMinAllocBytesForEviction
&& mBuffers.size() < kMinBufferCountForEviction) { || mBuffers.size() < kMinBufferCountForEviction)) {
break; break;
} }
auto it = mBuffers.find(*freeIt); auto it = mBuffers.find(*freeIt);

Loading…
Cancel
Save