linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* shrink_mmap ()?
@ 1998-03-26 12:34 Chirayu Patel
  1998-03-26 13:09 ` Rik van Riel
  0 siblings, 1 reply; 2+ messages in thread
From: Chirayu Patel @ 1998-03-26 12:34 UTC (permalink / raw)
  To: linux-mm, linux-kernel


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;
		}
------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-03-26 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-26 12:34 shrink_mmap ()? Chirayu Patel
1998-03-26 13:09 ` Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox