linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kanoj@google.engr.sgi.com (Kanoj Sarcar)
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Ben LaHaise <bcrl@redhat.com>, linux-mm@kvack.org
Subject: Re: [patch] first bit of vm balancing fixes for 2.3.52-1
Date: Mon, 13 Mar 2000 15:28:41 -0800 (PST)	[thread overview]
Message-ID: <200003132328.PAA31009@google.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.10.10003131454560.1031-100000@penguin.transmeta.com> from "Linus Torvalds" at Mar 13, 2000 02:55:39 PM

> 
> 
> On Mon, 13 Mar 2000, Ben LaHaise wrote:
> >
> > This is the first little bit of a few vm balancing patches I've been
> > working on.  It does two main things: moves the lru_cache list into the
> > per-zone structure, and slightly reworks the kswapd wakeup logic so the
> > zone_wake_kswapd flag is cleared in free_pages_ok.  Moving the lru_cache
> > list into the zone structure means we can make much better progress when
> > trying to free a specific type of memory.  Moving the clearing of the
> > zone_wake_kswapd flag into the free_pages routine stops kswapd from
> > continuing to swap out ad nausium: my box will discard the entire page
> > cache when it hits low memory when doing a simple sequential read.  With
> > this patch in place it hovers around 3MB free as it should.
> 
> Looks sane to me.
> 
> 		Linus

I am not sure about the zone lru_cache, since any claims without extensive
performance testing is meaningless ... but it does look more cleaner
theoretically. 

About the zone_wake_kswapd clearing in free_pages, yes, it is the right
thing to do ... looking at 2.2, a similar thing was done (ie, nr_free_pages
was updated, which was a signal to the balancing code). Unfortunately, 
this leads to a classfree() call in both pagefree and pagealloc, but I guess
thats the cost of fixing the memory class bugs present in 2.2. 

I do have a problem though with the way the zone_wake_kswapd flag is
otherwise being manipulated in the patch. The rules by which low_on_memory,
zone_wake_kswapd and kswapd poking is done is in Documentation/vm/balance.
I think free_pages_ok also needs to clear the low_on_memory (its never
being cleared in your code). I think the code in the (free <= z->pages_high)
in __alloc_pages() should stay the way it is, unless you can come up for 
a logic for changing it.

Kanoj
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

  reply	other threads:[~2000-03-13 23:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-13 22:50 Ben LaHaise
2000-03-13 22:55 ` Linus Torvalds
2000-03-13 23:28   ` Kanoj Sarcar [this message]
2000-03-13 23:31     ` Linus Torvalds
2000-03-14  0:23       ` Kanoj Sarcar
2000-03-14  0:32         ` Linus Torvalds
2000-03-17 12:35 ` Stephen C. Tweedie
2000-03-20 20:58   ` Kanoj Sarcar
2000-03-20 21:31     ` Linus Torvalds
2000-03-20 22:06       ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200003132328.PAA31009@google.engr.sgi.com \
    --to=kanoj@google.engr.sgi.com \
    --cc=bcrl@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox