Re: [PATCH -mm 23/25] Noreclaim LRU scan sysctl

From: Li Zefan
Date: Mon Jun 09 2008 - 22:54:17 EST


> +static void show_page_path(struct page *page)
> +{
> + char buf[256];
> + if (page_file_cache(page)) {
> + struct address_space *mapping = page->mapping;
> + struct dentry *dentry;
> + pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT);
> +
> + spin_lock(&mapping->i_mmap_lock);
> + dentry = d_find_alias(mapping->host);
> + printk(KERN_INFO "rescued: %s %lu\n",
> + dentry_path(dentry, buf, 256), pgoff);
> + spin_unlock(&mapping->i_mmap_lock);
> + } else {
> + struct anon_vma *anon_vma;
> + struct vm_area_struct *vma;
> +
> + anon_vma = page_lock_anon_vma(page);
> + if (!anon_vma)
> + return;
> +
> + list_for_each_entry(vma, &anon_vma->head, anon_vma_node) {
> + printk(KERN_INFO "rescued: anon %s\n",
> + vma->vm_mm->owner->comm);

This would cause compile failure if !CONFIG_MM_OWNER.

> + break;
> + }
> + page_unlock_anon_vma(anon_vma);
> + }
> +}
--
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/