Project

General

Profile

Actions

Feature #2219

closed

CS policy: LRU

Added by Spyros Mastorakis over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Tables
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
3.00 h

Description

Develop a Least Recently Used policy for ContentStore.


Related issues 1 (0 open1 closed)

Blocked by NFD - Feature #1207: CS policy interfaceClosedMinsheng Zhang02/26/2015

Actions
Actions #1

Updated by Junxiao Shi over 9 years ago

Actions #2

Updated by Junxiao Shi over 9 years ago

  • Tracker changed from Task to Feature
  • Subject changed from Replacement policies in CS. to Replacement policies in CS
  • Category set to Tables
  • Start date deleted (11/24/2014)
Actions #3

Updated by Junxiao Shi about 9 years ago

  • Subject changed from Replacement policies in CS to CS policy: LRU
  • Description updated (diff)
  • Estimated time set to 3.00 h
Actions #4

Updated by Junxiao Shi about 9 years ago

Actions #5

Updated by Junxiao Shi about 9 years ago

Actions #6

Updated by Junxiao Shi over 8 years ago

  • Assignee set to Minsheng Zhang
  • Target version set to v0.4
Actions #7

Updated by Minsheng Zhang over 8 years ago

Should this feature be normal LRU policy or Priority-LRU policy like the default Priority-fifo?

Actions #8

Updated by Junxiao Shi over 8 years ago

Reply to note-7:

This is regular LRU.
Forget about unsolicited.

Actions #9

Updated by Minsheng Zhang over 8 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 20
Actions #10

Updated by Junxiao Shi over 8 years ago

Do I need to update NFD develop guide for Policy LRU?

Yes. Add a paragraph after "priority FIFO cache policy" to describe LRU policy, and how to select this policy at compile time (eg. what files to modify).

Actions #11

Updated by Minsheng Zhang over 8 years ago

  • % Done changed from 20 to 90

NFD development guide updated

Actions #12

Updated by Junxiao Shi over 8 years ago

In nfd-docs:commit:95c0794f0c18ea7c83f11c1ae45ba998e9b6f172, LRU cache policy is described as:

At any time, when an entry is used or refreshed, its Table iterator is relocated to the head of the queue.
Or when an entry is newly inserted, its Table iterator is pushed at the tail of the queue.
When an entry is evicted, its Table iterator erased from the head of its Queue,

This means:

  • Head of queue has last accessed entry, and last re-inserted (refreshed) entry.
  • Tail of queue has last newly inserted entry.
  • Head of queue is evicted first.

Questions:

  • Why is "newly inserted" and "re-inserted (refreshed)" processed differently?
  • Why is last accessed entry (head of queue) evicted first?
Actions #13

Updated by Minsheng Zhang over 8 years ago

  • Why is "newly inserted" and "re-inserted (refreshed)" processed differently?
  • Why is last accessed entry (head of queue) evicted first?

I gave wrong description about this. Re-inserted entry actually is relocated to tail of the queue. So last accessed entry is not evicted first. "Newly inserted" and "re-inserted (refreshed)" should be processed same, both put to tail of the queue.

Actions #14

Updated by Junxiao Shi over 8 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

I confirm documentation is correctly updated in nfd-docs:commit:a40f2c402cd457702e1bedabb9bd3cd56fa92a2d.

Actions

Also available in: Atom PDF