Project

General

Profile

Feature #4940

Runtime cache policy change

Added by Junxiao Shi over 2 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

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
#1

Updated by Junxiao Shi over 2 years ago

  • Blocks Feature #4941: LRU policy: adopt entries from another policy added
#2

Updated by Junxiao Shi over 2 years ago

  • Blocks Feature #4942: Priority FIFO policy: adopt entries from another policy added
#3

Updated by Junxiao Shi over 2 years ago

  • Blocks Feature #4943: CsMgmt: retrieve and change cache policy added

Also available in: Atom PDF