linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Roger Larsson <roger.larsson@optronic.se>
To: linux-mm@kvack.org
Subject: Re: [patch] improve streaming I/O [bug in shrink_mmap()]
Date: Tue, 13 Jun 2000 10:10:33 +0200	[thread overview]
Message-ID: <3945ED59.F13FFADC@optronic.se> (raw)

> On Mon, 12 Jun 2000, Stephen C. Tweedie wrote:
> > On Mon, Jun 12, 2000 at 11:46:09PM +0200, Zlatko Calusic wrote:
> > > 
> > > This simple one-liner solves a long standing problem in Linux VM.
> > > While searching for a discardable page in shrink_mmap() Linux was too
> > > easily failing and subsequently falling back to swapping. The problem
> > > was that shrink_mmap() counted pages from the wrong zone, and in case
> > > of balancing a relatively smaller zone (e.g. DMA zone on a 128MB
> > > computer) "count" would be mistakenly spent dealing with pages from
> > > the wrong zone. The net effect of all this was spurious swapping that
> > > hurt performance greatly.
> > 
> > Nice --- it might also explain some of the excessive kswap CPU 
> > utilisation we've seen reported now and again.
> 
> Indeed. And to be honest, the patch can be made even simpler.
> 
> We can simply move the test up to above the count--, so we won't
> start IO for the "wrong" zones either.
> 
> There's only one serious bug left with the current shrink_mmap,
> a bug which appears to be easy to trigger with this patch, but
> still there without it.
> 
> Consider the case where only one zone has free_pages < pages_high,
> but all the pages in the LRU queue are from the other zone or not
> freeable (ie. with pagetable mapping)...
> 
> In those cases shrink_mmap() can loop forever. We probably want to
> add a "maxscan" variable, initialised to nr_lru_pages, which is
> decremented on every iteration through the loop to prevent us from
> triggering this bug.


An I have already released such a patch.
See "reduce swap due to shrink_mmap failures".

But it is probable that we should clean pages (= start I/O) even on
zones with no pressure - like Rajagopal reported.

/RogerL
--
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-06-13  8:10 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-13  8:10 Roger Larsson [this message]
     [not found] <8i3qe8$lltbv$1@fido.engr.sgi.com>
2000-06-14  6:17 ` Rajagopal Ananthanarayanan
  -- strict thread matches above, loose matches on Subject: below --
2000-06-12 21:46 Zlatko Calusic
2000-06-12 22:29 ` Stephen C. Tweedie
2000-06-12 23:04   ` Rik van Riel
2000-06-13 15:08   ` Andrea Arcangeli
2000-06-13 17:08     ` Juan J. Quintela
2000-06-13 19:09       ` Andrea Arcangeli
2000-06-13 19:32         ` Rik van Riel
2000-06-13 23:07           ` Andrea Arcangeli
2000-06-13 23:34             ` Rik van Riel
2000-06-14  0:12               ` Andrea Arcangeli
2000-06-14  0:58                 ` Rik van Riel
2000-06-14  1:18                   ` Andrea Arcangeli
2000-06-14  1:33                     ` Rik van Riel
2000-06-14  2:10                       ` Andrea Arcangeli
2000-06-14  2:46                         ` Rik van Riel
2000-06-14 13:01                           ` Andrea Arcangeli
2000-06-14 13:44                             ` Rik van Riel
2000-06-14 13:57                               ` Andrea Arcangeli
2000-06-14 16:48                                 ` Rik van Riel
2000-06-14 17:14                                   ` Andrea Arcangeli
2000-06-14 17:33                                     ` Rik van Riel
2000-06-14 18:37                                       ` Andrea Arcangeli
2000-06-13 23:41             ` Juan J. Quintela
2000-06-14  0:21               ` Andrea Arcangeli
2000-06-13 19:20     ` Rik van Riel
2000-06-13 21:49       ` Andrea Arcangeli

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=3945ED59.F13FFADC@optronic.se \
    --to=roger.larsson@optronic.se \
    --cc=linux-mm@kvack.org \
    --cc=roger.larsson@norran.net \
    /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