Re: [PATCH #2] OOM kill trigger

2001-07-07 Thread Rik van Riel
On Fri, 6 Jul 2001, Jeff Garzik wrote: > Rik van Riel wrote: > > + cache_mem = atomic_read(_cache_size); > > + cache_mem += atomic_read(_pages); > > + cache_mem -= swapper_space.nrpages; > > + limit = (page_cache.min_percent + buffer_mem.min_percent); > > Don't you need

Re: [PATCH #2] OOM kill trigger

2001-07-07 Thread Rik van Riel
On Fri, 6 Jul 2001, Jeff Garzik wrote: Rik van Riel wrote: + cache_mem = atomic_read(page_cache_size); + cache_mem += atomic_read(buffermem_pages); + cache_mem -= swapper_space.nrpages; + limit = (page_cache.min_percent + buffer_mem.min_percent); Don't you need

Re: [PATCH #2] OOM kill trigger

2001-07-06 Thread Jeff Garzik
Rik van Riel wrote: > + cache_mem = atomic_read(_cache_size); > + cache_mem += atomic_read(_pages); > + cache_mem -= swapper_space.nrpages; > + limit = (page_cache.min_percent + buffer_mem.min_percent); Don't you need extra protection around swapper_space.nrpages? A

[PATCH #2] OOM kill trigger

2001-07-06 Thread Rik van Riel
Hi, As Hugh pointed out, the info on how many pages we have in the swap cache is (of course) present in the swapper_space structure. Patch has been shrunk accordingly... Rik -- Executive summary of a recent Microsoft press release: "we are concerned about the GNU General Public License

[PATCH #2] OOM kill trigger

2001-07-06 Thread Rik van Riel
Hi, As Hugh pointed out, the info on how many pages we have in the swap cache is (of course) present in the swapper_space structure. Patch has been shrunk accordingly... Rik -- Executive summary of a recent Microsoft press release: we are concerned about the GNU General Public License (GPL)

Re: [PATCH #2] OOM kill trigger

2001-07-06 Thread Jeff Garzik
Rik van Riel wrote: + cache_mem = atomic_read(page_cache_size); + cache_mem += atomic_read(buffermem_pages); + cache_mem -= swapper_space.nrpages; + limit = (page_cache.min_percent + buffer_mem.min_percent); Don't you need extra protection around