Re: [RFC] 2.3.39 zone balancing

From: Kanoj Sarcar (kanoj@google.engr.sgi.com)
Date: Tue Feb 08 2000 - 15:20:03 EST


>
> On Mon, 7 Feb 2000, Kanoj Sarcar wrote:
>
> >I hate the part of adding in more magic numbers to the balancing
> >logic, unless you can demonstrate how it helps. I know, 2.2
>
> It helps since now I avoid to waste 5mbyte of ram ;). And machines with

How does the min/max help you in this?

> 2mbyte of memory will try to take free 10 pages instead of 4 pages of ram.
> 4 pages is too low for such machines too.

Okay, you are changing the formula for the optimal number of free
pages in a zone. Ideally, this should depend just on the zone size,
but really, it also needs to consider the rate of intr-context
non-waitable allocation requests that may be generated (this is
probably where the "min" value comes in?) And maybe
some performance considerations (is that the logic for a "max"
value?)

>
> >uses these magic numbers to set freepages.*, but I can't see a
> >logic to having min/max for zones. It is still probably acceptable
>
> See above.
>
> >to have the magic numbers in 2.3 for freepages.* setting (at
> >least until we have a zone aware kswapd), for global stuff. If
>
> I think freepages.* is dead. I just wanted to remove it but actually
> nobody is hurted by it so I left it there for now.

In 2.3.42, freepages.* is still used in kswapd, right? I believe we
should try to kill that usage, and make kswapd zone aware ... I sent
a patch to Linus about this.

>
> >The ZONE_BALANCED macro is currently a good way to see whether
> >we really want to do more compute intensive classfree().
>
> I don't think ZONE_BALANCED make sense. It's not the fast path. Do the
> thing right, use classfree and all become obviously correct.

Only when ZONE_BALANCED returns "zone-not-balanced", do you need to do
classfree(). classfree() might return "zone-is-balanced" though. If
ZONE_BALANCED says "zone-is-balanced", classfree() will never say
"zone-not-balanced". That's the optimization ...

I don't think ZONE_BALANCED is a big deal, but my experiments with zone
balance tweaks on a 16Mb box have left me paranoid of any changes in
these parts. As you mention, its _probably_ better to kill it ...

Kanoj
>
> If you are worried by the O(n) complexity of classfree reimplement it in
> O(1) but I wouldn't use ZONE_BALANCED to skip the O(n) complexity when you
> are lucky (not in the fast path).
>
> Andrea
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:13 EST