Messages in this thread Patch in this message |  | | Date | Thu, 27 Sep 2001 14:41:23 +0100 (BST) | From | Hugh Dickins <> | Subject | Re: [patch] Re: weird memory related problems, negative memory usage or fake memory usage? |
| |
On Tue, 25 Sep 2001, Benjamin LaHaise wrote: > > This should fix it. > > - freed ++; > + struct page *page = pte_page(pte); > + if (!PageReserved(page) && VALID_PAGE(page)) > + freed ++;
NO! I expect that fixes the rss, but crashes my system: must test VALID_PAGE(page) _before_ !PageReserved(page).
Hugh
--- linux-2.4.10/mm/memory.c Sun Sep 23 04:36:50 2001 +++ linux/mm/memory.c Thu Sep 27 14:29:28 2001 @@ -319,7 +319,9 @@ if (pte_none(pte)) continue; if (pte_present(pte)) { - freed ++; + struct page *page = pte_page(pte); + if (VALID_PAGE(page) && !PageReserved(page)) + freed ++; /* This will eventually call __free_pte on the pte. */ tlb_remove_page(tlb, ptep, address + offset); } else { - 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/
|  |