All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: linux-mm@kvack.org, piggin@cyberone.com.au
Subject: Re: [PATCH] kswapd shall not sleep during page shortage
Date: Tue, 9 Nov 2004 13:33:43 -0800	[thread overview]
Message-ID: <20041109133343.0b34896d.akpm@osdl.org> (raw)
In-Reply-To: <20041109174125.GF7632@logos.cnet>

Marcelo Tosatti <marcelo.tosatti@cyclades.com> wrote:
>
> On Tue, Nov 09, 2004 at 12:19:45PM -0800, Andrew Morton wrote:
> > Marcelo Tosatti <marcelo.tosatti@cyclades.com> wrote:
> > >
> > > 
> > > Andrew,
> > > 
> > > I was wrong last time I read balance_pgdat() when I thought kswapd
> > > couldnt sleep under page shortage. 
> > > 
> > > It can, because all_zones_ok is set to "1" inside the 
> > > "priority=DEF_PRIORITY; priority >= 0; priority--" loop.
> > > 
> > > So this patch sets "all_zones_ok" to zero even if all_unreclaimable 
> > > is set, avoiding it from sleeping when zones are under page short.
> > > 
> > 
> > Does this solve any observed problem?  What testing was done, and what were
> > the results??
> 
> 
> The observed problem are the page allocation failures!

But the patch doesn't have any effect on that, which I can see.

> No testing has been done, but it is an obvious problem if you read the
> code. 

Not really.  The move of the all_unreclaimable test doesn't seem to do
anything, because we'll just skip that zone anyway in the next loop.

Maybe you moved the all_unreclaimable test just so that there's an
opportunity to clear all_zones_ok?  I dunno.

AFAICT, the early clearing of all_zones_ok will have no effect on kswapd
throttling because the total_scanned logic is disabled.

What I think your patch will do is to cause kswapd to do the `goto
loop_again' thing if all zones are unreclaimable.  Which appears to risk
putting kswapd into a busy loop when we're out of memory.

So I'm all confused and concerned.  It would help if you were to explain
your thinking more completely...
--
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-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2004-11-09 21:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-09 16:46 [PATCH] kswapd shall not sleep during page shortage Marcelo Tosatti
2004-11-09 20:19 ` Andrew Morton
2004-11-09 17:41   ` Marcelo Tosatti
2004-11-09 21:33     ` Andrew Morton [this message]
2004-11-09 18:26       ` Marcelo Tosatti
2004-11-09 22:22         ` Andrew Morton
2004-11-09 20:31           ` Marcelo Tosatti
2004-11-10  0:28             ` Andrew Morton
2004-11-09 23:16               ` Marcelo Tosatti
2004-11-09 23:34                 ` Marcelo Tosatti
2004-11-10  2:53                 ` Andrew Morton
2004-11-10 18:14               ` Marcelo Tosatti
2004-11-10 22:08                 ` Andrew Morton
2004-11-10  0:56           ` Nick Piggin
2004-11-10  2:49             ` Nick Piggin
2004-11-10  2:56               ` Andrew Morton
2004-11-10  3:12                 ` Nick Piggin
2004-11-10  3:18                   ` Andrew Morton
2004-11-10  3:27                     ` Nick Piggin
2004-11-10  4:15                     ` Nick Piggin
2004-11-10  8:17                       ` Marcelo Tosatti

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=20041109133343.0b34896d.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-mm@kvack.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=piggin@cyberone.com.au \
    /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.