rmap.c: try_to_unmap_file(): VM_LOCKED not respected

From: li nux
Date: Tue Jun 14 2005 - 00:15:37 EST


My application is using remap_file_pages and mlocks
those pages.
So in the code of try_to_unmap_file (see below),
I should never reach the call to try_to_unmap_cluster,
because for those pages VM_LOCKED is always set.
But, under heavy load I am seeing try_to_unmap_cluster
is getting called. Stack:
try_to_unmap_cluster
try_to_unmap_file
try_to_unmap
shrink_list
__pagevec_release
shrink_cache
shrink_zone
balance_pgdat
prepare_to_wait
kswapd


Any idea why VM_LOCKED is not being respected ?

do {
list_for_each_entry(vma, &mapping->i_mmap_nonlinear,

shared.vm_set.list) {
if (vma->vm_flags & (VM_LOCKED|VM_RESERVED))
continue;
cursor = (unsigned long) vma->vm_private_data;
while (vma->vm_mm->rss &&
cursor < max_nl_cursor &&
cursor < vma->vm_end - vma->vm_start) {

try_to_unmap_cluster(cursor, &mapcount, vma);
cursor += CLUSTER_SIZE;
}
.....<snip>
} while (max_nl_cursor <= max_nl_size);

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
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/