All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Peter Osterlund <petero2@telia.com>
Cc: pavel@ucw.cz, linux-kernel@vger.kernel.org
Subject: Re: Software suspend testing in 2.6.0-test1
Date: Fri, 18 Jul 2003 13:15:27 -0700	[thread overview]
Message-ID: <20030718131527.7cf4ca5e.akpm@osdl.org> (raw)
In-Reply-To: <m2oezrppxo.fsf@telia.com>

Peter Osterlund <petero2@telia.com> wrote:
>
> The patch below works, but doesn't really solve anything, because it
> is just as slow as the original code.

That's OK - it's a step in the right direction.

> This is not surprising because
> it is still balance_pgdat() that does the page freeing, the only
> difference being that it is now called from kswapd which is woken up
> by the alloc_page() call.

Yup.  Probaby we should not be throttling kswapd if it is making good
progress, but this needs broad testing and thought.  Something like this,
untested:


--- 25/mm/vmscan.c~less-kswapd-throttling	Thu Jul 17 15:35:09 2003
+++ 25-akpm/mm/vmscan.c	Thu Jul 17 15:35:12 2003
@@ -930,7 +930,8 @@ static int balance_pgdat(pg_data_t *pgda
 		}
 		if (all_zones_ok)
 			break;
-		blk_congestion_wait(WRITE, HZ/10);
+		if (to_free)
+			blk_congestion_wait(WRITE, HZ/10);
 	}
 	return nr_pages - to_free;
 }


> Note that I had to use HZ/5 in free_some_memory() or else the loop
> would terminate too early. The main problem seems to be that
> balance_pgdat() is too slow when freeing memory. The function can fail
> to free memory in the inner loop either because the disk is congested
> or because too few pages are scanned, but in both cases the function
> calls blk_congestion_wait(), and in the second case the disk may be
> idle and then blk_congestion_wait() doesn't return until the timeout
> expires.

hm, perhaps because kswapd is throttled rather than doing work.

Try the above change, see if you still need the extended timeout in
free_some_memory().

Also, play around with using __GFP_WAIT|__GFP_HIGH|__GFP_NORETRY rather
than GFP_ATOMIC.



  reply	other threads:[~2003-07-18 20:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-17 19:46 Software suspend testing in 2.6.0-test1 Peter Osterlund
2003-07-17 20:00 ` Pavel Machek
2003-07-17 20:09   ` Andrew Morton
2003-07-18  9:59     ` Peter Osterlund
2003-07-18 10:24       ` Andrew Morton
2003-07-18 15:22         ` Pavel Machek
2003-07-18 15:55           ` Peter Osterlund
2003-07-18 16:45             ` Andrew Morton
2003-07-18 17:50               ` Pavel Machek
2003-07-18 18:02                 ` Patrick Mochel
2003-07-18 18:04                   ` Pavel Machek
2003-07-18 21:05                     ` Nigel Cunningham
2003-07-18 19:37                 ` Andrew Morton
2003-07-18 19:58               ` Peter Osterlund
2003-07-18 20:15                 ` Andrew Morton [this message]
2003-07-18 22:13                   ` Pavel Machek
2003-07-20  0:22                   ` Peter Osterlund
2003-07-20  1:01                     ` Andrew Morton
2003-07-20  7:45                       ` Peter Osterlund
2003-07-18 21:05               ` Nigel Cunningham
2003-07-21 10:00   ` Peter Osterlund
2003-07-21 12:58     ` Pavel Machek
2003-07-21 14:36       ` Peter Osterlund
2003-07-21 21:28         ` Pavel Machek
2003-07-21 23:46           ` Peter Osterlund
2003-07-22 11:04             ` Pavel Machek

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=20030718131527.7cf4ca5e.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=petero2@telia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.