Re: [PATCH] memory counting fix

From: Marcelo Tosatti
Date: Tue Oct 07 2003 - 06:51:00 EST



I dont see why reserved pages shouldnt be counted in the processes RSS.

What I'm missing here, Jaroslav?

On Tue, 30 Sep 2003, Jaroslav Kysela wrote:

> Hi,
>
> this fixes rss pages counting for drivers which returns a reserved
> page from the nopage callback (like ALSA). Thank you for applying to the
> 2.4 tree.
>
> ===== memory.c 1.56 vs edited =====
> --- 1.56/mm/memory.c Fri Apr 5 20:06:57 2002
> +++ edited/memory.c Tue Sep 30 13:10:20 2003
> @@ -1287,7 +1287,8 @@
> */
> /* Only go through if we didn't race with anybody else... */
> if (pte_none(*page_table)) {
> - ++mm->rss;
> + if (!PageReserved(new_page))
> + ++mm->rss;
> flush_page_to_ram(new_page);
> flush_icache_page(vma, new_page);
> entry = mk_pte(new_page, vma->vm_page_prot);

I dont see why

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