Re: ulimit -m

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 11, 2002 at 11:35:52PM -0300, Rik van Riel wrote:
> Basically what the thing did was call swap_out_mm() from
> handle_mm_fault() whenever the process was over its RSS limit.

I am looking at linux-2.4.18 with 2.4.18-rmap12h.
I can't find swap_out_mm() there. So I just changed a bit as following:

--- mm/memory.c.bak	Fri Jul 12 11:31:00 2002
+++ mm/memory.c	Fri Jul 12 11:31:19 2002
@@ -1385,8 +1385,7 @@
 	 * If we are over our RSS limit and the system needs memory,
 	 * we will free memory for the non-hogs and slow down a bit.
 	 */
-	if (mm->rlimit_rss && mm->rss > mm->rlimit_rss &&
-					free_high(ALL_ZONES) > 0)
+	if (mm->rlimit_rss && mm->rss > mm->rlimit_rss)
 		rss_free_pages(GFP_HIGHUSER);
 
 	/*

But still the RSS limit is not enforced.
Where else should I change? or I should refer to another kernel version?

BTW, I have tested "setrlimit()" by a simple program, it just behaves the
same as "ulimit".

Thanks!

-- 
regards,

ZM 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux