Reading the LRU Active and Incative List

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

 



I am working with linux kernel 2.6.18.

I am trying to read the LRU active list for each zone starting from the head of the active list. Following is a code snippet

**********************************************
show_active(&zone->active_list);


void show_active(struct list_head *init_active_list){
struct list_head *temp;
struct page *p;

for (temp=init_active_list->next; temp != init_active_list; temp=temp->next){
  p = list_entry(temp, struct page, lru);
}
}
*********************************************



However, when I print page frame numbers obtained from above, I notice that the page frame numbers seem to move back and forth in the active list and doesnot seem to follow a stack order as maintained by the kernel when it adds new pages to the head of the active list. Here are my questions

1. Is zone->active_list the head of the active LRU list for that zone?
2. What is the difference between page->lru and zone->active_list/zone_inactive_list?

Thanks
Bithika

[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