lkml.org 
[lkml]   [2001]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.025 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site