Subject: Re: [ul-kernel] [[email-masked]: summary of realtime memory issue]

From: Rik van Riel <[email-masked]>
Date: Wed, 25 Sep 2002 15:54:29 -0300 (BRT)

On Wed, 25 Sep 2002, Andrea Arcangeli wrote:
> On Wed, Sep 25, 2002 at 01:11:58PM -0300, Rik van Riel wrote:
> > -		if (!(gfp_mask & __GFP_WAIT))
> > +		if (!(gfp_mask & __GFP_WAIT) || current->rt_priority)
>
> It would be better to allow RT tasks to go ahead only between min and
> min >> 2. So basically down to min >> 1 and not min >> 2.

Agreed, does the patch below look better ?

Rik
-- 
Bravely reimplemented by the knights who say "NIH".
http://www.surriel.com/		http://distro.conectiva.com/
Spamtraps of the month:  [email-masked] [email-masked]

--- linux/mm/page_alloc.c.rthack	2002-09-25 12:06:28.000000000 -0300
+++ linux/mm/page_alloc.c	2002-09-25 15:53:56.000000000 -0300
@@ -339,6 +339,8 @@
 		min = z->watermarks[class_idx].min;
 		if (!(gfp_mask & __GFP_WAIT))
 			min >>= 2;
+		else if (current->rt_priority)
+			min >>= 1;
 		if (zone_free_pages(z, order) > min) {
 			page = rmqueue(z, order);
 			if (page)

-- 
To unsubscribe, email: [email-masked]
For additional commands, email: [email-masked]