Skip to contentSkip to conversation

Noreclaim LRU scan sysctl

PATCH Li Zefan 1 participant 1 message Jun 10, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Li Zefan

author
#1 lore raw
Quoted 14 lines
(quoted diff) +14 -0
+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 {

Review

Quoted 10 lines
(quoted diff) +10 -0
+		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.

Quoted 5 lines
(quoted diff) +5 -0
+			break;
+		}
+		page_unlock_anon_vma(anon_vma);
+	}
+}