Project

General

Profile

Feature #2219

CS policy: LRU

Added by Spyros Mastorakis almost 6 years ago. Updated about 5 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

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

Actions
#1

Updated by Junxiao Shi almost 6 years ago

#2

Updated by Junxiao Shi almost 6 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)
#3

Updated by Junxiao Shi over 5 years ago

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

Updated by Junxiao Shi over 5 years ago

#5

Updated by Junxiao Shi over 5 years ago

#6

Updated by Junxiao Shi about 5 years ago

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

Updated by Minsheng Zhang about 5 years ago

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

#8

Updated by Junxiao Shi about 5 years ago

Reply to note-7:

This is regular LRU.
Forget about unsolicited.

#9

Updated by Minsheng Zhang about 5 years ago

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

Updated by Junxiao Shi about 5 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).

#11

Updated by Minsheng Zhang about 5 years ago

  • % Done changed from 20 to 90

NFD development guide updated

#12

Updated by Junxiao Shi about 5 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?
#13

Updated by Minsheng Zhang about 5 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.

#14

Updated by Junxiao Shi about 5 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.

Also available in: Atom PDF