Re: Cache pool bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am sorry. We should only just modify the logic
ReplicatedPG::agent_estimate_atime_temp, atime should be now.

  if (temp)
    *temp = 0;
  if (hit_set->contains(oid)) {
    *atime = 0;
    if (temp)
      ++(*temp);
    else
      return;
  }

2014-10-28 12:28 GMT+08:00 池信泽 <xmdxcxz@xxxxxxxxx>:
> I think if it changed to be  *atime = p->first, Below logic should
> also be modified.
>
> ReplicatedPG::agent_maybe_evict
>
>     if (atime < 0 && obc->obs.oi.mtime != utime_t()) {
>       if (obc->obs.oi.local_mtime != utime_t()) {
>         atime = ceph_clock_now(NULL).sec() - obc->obs.oi.local_mtime;
>       } else {
>         atime = ceph_clock_now(NULL).sec() - obc->obs.oi.mtime;
>       }
>     }
>
>
> including
> ReplicatedPG::agent_estimate_atime_temp
>   if (temp)
>     *temp = 0;
>   if (hit_set->contains(oid)) {
>     *atime = 0;
>     if (temp)
>       ++(*temp);
>     else
>       return;
>   }
>
> 2014-10-28 12:02 GMT+08:00 Sage Weil <sage@xxxxxxxxxxxx>:
>> Yep.  The pull request looks is correct too, but needs to be squashed into
>> a single commit with a Signed-off-by: line and description.
>>
>> Zhiqiang, I think the reversed logic you just fixed in agent_maybe_evict()
>> was partly because this function is filling in atime (which sounds like a
>> timestamp) with an *age* (now - p->first).  I think we should change
>>
>>>       if (*atime < 0)
>>>       *atime = now - p->first;
>>
>> to be
>>
>>  *atime = p->first
>>
>> and/or adjust the caller accordingly...?
>>
>> sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux