Re: [patch] mm: use-once mapped file pages

From: Rik van Riel
Date: Tue Sep 15 2009 - 12:02:57 EST


Minchan Kim wrote:

http://git.kernel.org/?p=linux/kernel/git/torvalds/old-2.6-bkcvs.git;a=commitdiff;h=fe23e022c442bb917815e206c4765cd9150faef5

At that time, Rik added following as.
( I hate wordwrap, but my google webmail will do ;( )

+ /* File is mmap'd by somebody. */
+ if (!list_empty(&mapping->i_mmap) ||
!list_empty(&mapping->i_mmap_shared))
+ return 1;

It made your case worse as you noticed.

Other things changed since that code was added.

At the time, we set the page referenced bit at page fault
time, while today we propagate the referenced bit from the
page table to the struct page at MUNMAP time.

The code above was put in place to make sure the kernel
would cache often used (but very briefly mmaped) pages,
like the ones containing exec(3) in glibc.

However, propagating the referenced bit at munmap time
should have the same effect, allowing us to get rid of
my old page_mapping_inuse() code.

Frankly, I'm happy to see that code go :)

--
All rights reversed.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/