Project

General

Profile

Actions

Feature #4940

open

Runtime cache policy change

Added by Junxiao Shi over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Tables
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
3.00 h

Description

Currently, tables.cs_policy key of nfd.conf sets the cache replacement policy, but its change is ignored upon runtime configuration reload.
This issue is to allow changing cache replacement policy via configuration reload.

  • In cs::Policy base class, add:

    public:
      void adopt();
    private:
      virtual void doAdopt();
    

    The base class doAdopt function erases all CS entries.

  • When tables.cs_policy is changed during a configuration reload:

    1. Destruct the old cs::Policy subclass instance.
    2. Construct the new cs::Policy subclass instance, and invoke its adopt function.
  • A policy may override the doAdopt function, where it may enumerate existing CS entries and insert them to the policy's cleanup queues.

This issue only involves configuration reload, Cs, and cs::Policy base class implementation.
It does not involve cs::Policy subclass changes or management changes


Related issues 3 (3 open0 closed)

Blocks NFD - Feature #4941: LRU policy: adopt entries from another policyNew

Actions
Blocks NFD - Feature #4942: Priority FIFO policy: adopt entries from another policyNew

Actions
Blocks NFD - Feature #4943: CsMgmt: retrieve and change cache policyNew

Actions
Actions

Also available in: Atom PDF