lkml.org 
[lkml]   [2004]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] RSS limit enforcement for 2.6


Rik van Riel wrote:

>Hi,
>
>Hugh Dickins found a bug in the 2.4-rmap RSS limit enforcing
>code that may well explain why the previous port of the code
>to 2.6 resulted in bad performance. The split active lists
>in 2.4-rmap probably masked the largest damages, but in 2.6
>it was very much visible.
>
>

Hi Rik,
What was the problem by the way?

>The patch below should work. Pavel, Nick, still interested
>in testing the performance ? ;)
>

I could do that.

>@@ -593,6 +594,7 @@
> long mapped_ratio;
> long distress;
> long swap_tendency;
>+ int over_rsslimit;
>
> lru_add_drain();
> pgmoved = 0;
>@@ -657,7 +659,7 @@
> continue;
> }
> pte_chain_lock(page);
>- if (page_referenced(page)) {
>+ if (page_referenced(page, &over_rsslimit) && !over_rsslimit) {
> pte_chain_unlock(page);
> list_add(&page->lru, &l_active);
> continue;
>

This still has a problem that !reclaim_mapped scans will not
shrink a runaway process before putting a lot of pressure on
the rest of the pagecache.

You could do a page_gather_pte_info type thing that doesn't
actually clear all the referenced bits (would probably
SetPageReferenced). Unfortunately this has the downside that
you also need to walk the pte chains for all mapped pages even
in the !reclaim_mapped case.

But it is a good start. We advertise the functionality, so we
should be trying to do something with rss limits.

-
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/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.184 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site