Messages in this thread Patch in this message | | | Date | Tue, 7 Oct 2003 14:33:21 +0200 (CEST) | From | Jaroslav Kysela <> | Subject | Re: [PATCH] memory counting fix |
| |
On Tue, 7 Oct 2003, Marcelo Tosatti wrote:
> > I dont see why reserved pages shouldnt be counted in the processes RSS. > > What I'm missing here, Jaroslav?
Note that zap_pte_range() in mm/memory.c does not free the reserved pages:
if (VALID_PAGE(page) && !PageReserved(page)) freed ++;
I think that the drivers should not take care about correcting the mm->rss counter itself and we have exactly same patch in 2.6.
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 > >
Jaroslav
----- Jaroslav Kysela <perex@suse.cz> Linux Kernel Sound Maintainer ALSA Project, SuSE Labs - 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/
| |