2. The current design allows kind of restricts to page cache to it's current
active/inactive list form. Wouldn't it be better to generalize this? For
example, something like
struct page_cache {
struct list_head[MAX_LISTS];
void (*add_to_cache)(struct page *p);
void (*del_from_cache)(struct page *);
void (*page_accessed)(struct page *);
};
In this way, one could have multiple page caches as desired, and could select
at complie time or maybe eve boot time (via a kernel arg). Now, writing a new
page replacement policy is as simple as implementing the above struct. Does
this make any sense? Or am i missing the big picture?