Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b578c69 authored by Sungtak Lee's avatar Sungtak Lee Committed by android-build-merger
Browse files

Merge "bufferpool@2.0 tune eviction params" into qt-qpr1-dev am: aa700c13

am: 671c76ff

Change-Id: I790820845744f1b8061028544930d030cbf15cf6
parents c3630870 671c76ff
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ namespace {
    static constexpr int64_t kLogDurationUs = 5000000; // 5 secs

    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
@@ -718,8 +718,8 @@ void Accessor::Impl::BufferPool::cleanUp(bool clearCache) {
                  mStats.mTotalFetches, mStats.mTotalTransfers);
        }
        for (auto freeIt = mFreeBuffers.begin(); freeIt != mFreeBuffers.end();) {
            if (!clearCache && mStats.mSizeCached < kMinAllocBytesForEviction
                    && mBuffers.size() < kMinBufferCountForEviction) {
            if (!clearCache && (mStats.mSizeCached < kMinAllocBytesForEviction
                    || mBuffers.size() < kMinBufferCountForEviction)) {
                break;
            }
            auto it = mBuffers.find(*freeIt);