[PATCH] Re: 4GB MemShared, Cached bigger (and growing) than MemTotal (64MB) on 2.4.9-ac18

From: Hugh Dickins (hugh@veritas.com)
Date: Mon Oct 01 2001 - 16:17:26 EST


On 1 Oct 2001, Christoph Rohland wrote:
> On Sun, 30 Sep 2001, Mike Fedyk wrote:
> >
> > After this happened, I saw MemShared go up to about 4GB, and Cached
> > started growing, getting even bigger than ram!
>
> Apparently the shmem accounting is screwed. (Hugh does something ring
> at your side?)

I've now looked, and it's obviously my error in -ac shmem_writepage:
patch below against 2.4.10-ac2, would apply equally to 2.4.9-ac16 on.

Hugh

--- 2.4.10-ac2/mm/shmem.c Mon Oct 1 21:36:28 2001
+++ linux/mm/shmem.c Mon Oct 1 21:41:00 2001
@@ -462,6 +462,7 @@
                 swap_list_unlock();
                 /* Add it back to the page cache */
                 add_to_page_cache_locked(page, mapping, index);
+ atomic_inc(&shmem_nrpages);
                 activate_page(page);
                 SetPageDirty(page);
                 error = -ENOMEM;

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



This archive was generated by hypermail 2b29 : Sun Oct 07 2001 - 21:00:16 EST