Hi, I agree with you this is a bug. I think we should change the following code: // KISS: if [lower,upper] spans our target effort, evict it. if (atime_lower >= agent_state->evict_effort) return false; to something like this: if (1000000 - atime_upper >= agent_state->evict_effort) return false; cc the ceph-devel list for comments. ________________________________________ Date: Mon, 27 Oct 2014 10:20:01 +0800 Subject: Cache pool bug? From: xmdxcxz@xxxxxxxxx To: wonzhq@xxxxxxxxxxx hi, zhiqiang: When I read the ReplicatedPG::agent_maybe_evic, I found than the newest object has more probability to be evicted. For Example: the object in hit_set is newest object, call the funtion agent_estimate_atime_temp(soid, &atime, NULL /*FIXME &temp*/); atime is 0 when return. agent_state->atime_hist.get_position_micro(atime, &atime_lower, &atime_upper), the atime_lower is 0 when return. // KISS: if [lower,upper] spans our target effort, evict it. if (atime_lower >= agent_state->evict_effort) return false; Above, the newest object in hit_set is evicted. Is there a bug? Or, whether I skip something? Thanks ��.n��������+%������w��{.n����z��u���ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f