shrink_mmap ()?

Chirayu Patel (chirayu@wipro.tcpn.com)
Thu, 26 Mar 1998 18:04:23 +0530 (GMT+0530)


Hi,

I was going through the source for shrink_mmap.......

The attached code puzzled me..

We are freeing a page with count = 1 (referenced by one process only) but
we are not manipulating any page table entries. Why? Shouldnt we be
manipulating the page table entries or where are the page table entries
getting manipulated?

I know I have missed something terribly obvious over here. Can someone
please help me out.

Thanks.

-- Chirayu

-----------------------------------------------------------------------
switch (atomic_read(&page->count)) {
case 1:
/* is it a swap-cache or page-cache page? */
if (page->inode) {
if (test_and_clear_bit(PG_referenced,
&page->flags)) {
touch_page(page);
break;
}
age_page(page);
if (page->age)
break;
if (PageSwapCache(page)) {
delete_from_swap_cache(page);
return 1;
}
remove_page_from_hash_queue(page);
remove_page_from_inode_queue(page);
__free_page(page);
return 1;
}
------------------------------------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu