Re: another writable swap-cached page

Stephen C. Tweedie (sct@redhat.com)
Mon, 6 Jul 1998 15:23:28 +0100


Hi,

On Mon, 6 Jul 1998 02:17:54 +0100 (BST), Ganesh Sittampalam
<ganesh.sittampalam@ox.compsoc.net> said:

> I had another of these just happen to me. Still 2.1.106+ac4. Uptime 6 days.
> Jul 6 02:09:47 munchkin kernel: VM: Found a writable swap-cached page!

OK, please apply this patch to 2.1.108 (if you're willing to upgrade)
and let me know what you get. That will hopefully narrow things down.
It will be really useful to know exactly what state this page is in.

----------------------------------------------------------------
--- mm/vmscan.c~ Fri Jun 26 11:25:30 1998
+++ mm/vmscan.c Mon Jul 6 15:11:30 1998
@@ -108,7 +108,13 @@
if (PageSwapCache(page_map)) {
if (pte_write(pte)) {
struct page *found;
- printk ("VM: Found a writable swap-cached page!\n");
+ printk (KERN_ERR
+ "VM: Found a writable swap-cached page!\n"
+ "pte %8lx, vma flags %08x, "
+ "page flags %08lx, count %d\n",
+ pte_val(pte), vma->vm_flags,
+ page_map->flags,
+ atomic_read(&page_map->count));
/* Try to diagnose the problem ... */
found = find_page(&swapper_inode, page_map->offset);
if (found) {
----------------------------------------------------------------

Alternatively, to keep with your existing 2.1.106 kernel, replace the
PageSwapCache test at around line 110 of mm/vmscan.c with the entire
chunk:

----------------------------------------------------------------
if (PageSwapCache(page_map)) {
if (pte_write(pte)) {
struct page *found;
printk (KERN_ERR
"VM: Found a writable swap-cached page!\n"
"pte %8lx, vma flags %08x, "
"page flags %08lx, count %d\n",
pte_val(pte), vma->vm_flags,
page_map->flags,
atomic_read(&page_map->count));
/* Try to diagnose the problem ... */
found = find_page(&swapper_inode, page_map->offset);
if (found) {
printk("page=%p@%08lx, found=%p, count=%d\n",
page_map, page_map->offset,
found, atomic_read(&found->count));
__free_page(found);
} else
printk ("Spurious, page not in cache\n");
return 0;
}
}
----------------------------------------------------------------

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu