Re: Page Replacement in 2.6.10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 1 Mar 2005, Rahul Iyer wrote:

> I've almost gotten this figured out... except:
> 1. Are the active and inactive lists per zone?

Yes.   You need to be able to allocate pages from a certain zone,
so the ability to free pages from a certain zone is also needed.

> 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?

How would you decide from which page cache to free pages ?

-- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux