linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@transmeta.com>
To: riel@nl.linux.org
Cc: Rajagopal Ananthanarayanan <ananth@sgi.com>,
	Benjamin Redelings I <bredelin@ucla.edu>,
	linux-mm@kvack.org
Subject: Re: [DATAPOINT] pre7-6 will not swap
Date: Sun, 7 May 2000 10:53:29 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.10.10005071048120.30202-100000@cesium.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0005071418520.8605-100000@duckman.conectiva>


On Sun, 7 May 2000, Rik van Riel wrote:

> On Sat, 6 May 2000, Linus Torvalds wrote:
> 
> >  - looking at "shrink_mmap()", my reaction would not be to add more
> >    complexity to it, but to remove the _one_ special case that looks at
> >    one specific zone:
> > 
> >         /* wrong zone?  not looped too often?    roll again... */
> >         if (page->zone != zone && count)
> >                 goto again;
> > 
> >    I would suggest just removing that test altogether. The page wasn't
> >    from a "wrong zone". It was just a different zone that also needed
> >    balancing.
> 
> The danger in this is that we could "use up" the remaining
> ticks on the count variable in do_try_to_free_pages() and
> end up with a failed rmqueue for the request...

I agree.

However, I think the logic should be
 - kswapd tries to keep all zones reasonably well balanced
 - but kswapd obviously cannot do a perfect job, especially with bursty
   allocations, so:
 - we should at some point start synchronously helping kswapd
 - if somebody has special requirements, they may not be always possibly
   under all circumstances.

Basically, it boils down to: we should try to do our best, but we cannot
do wonders and we should realize that too.

> Oh, and the return value for shrink_mmap() will still
> indicate success, even if we failed to free a page for
> the zone we intended ... we've already decided for that
> before we get into the loop or not.

You're right. The only downside to the extra test is that it unbalances
the page freeing, and can lead to (for example) not using swap very
efficiently because we're looping too much in shrink_mmap. Which actually
seems to be one of the symptoms right now, but it may of course be dueto
something else too.

It can also make the aging less efficient.

But my real reason for disliking it is that I prefer conceptually simple
approaches, and that one test just doesn't fit conceptually ;)

		Linus

--
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-05-07 17:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8evk0f$7jote$1@fido.engr.sgi.com>
2000-05-06 17:12 ` Rajagopal Ananthanarayanan
2000-05-06  4:25   ` Benjamin Redelings I
2000-05-06 19:35   ` Linus Torvalds
2000-05-06  5:35     ` Benjamin Redelings I
2000-05-06 21:46       ` Rik van Riel
2000-05-06 22:24         ` Rajagopal Ananthanarayanan
2000-05-06 14:03           ` Benjamin Redelings I
2000-05-07  0:22           ` Rik van Riel
2000-05-07  2:23           ` Linus Torvalds
2000-05-07 17:40             ` Rik van Riel
2000-05-07 17:53               ` Linus Torvalds [this message]
2000-05-07 19:13                 ` Rajagopal Ananthanarayanan
2000-05-07 19:30                   ` Linus Torvalds
2000-05-08 20:40                     ` gprof data for pre7-6 Rajagopal Ananthanarayanan
2000-05-09  1:52     ` [DATAPOINT] pre7-6 will not swap Quintela Carreira Juan J.
2000-05-09  2:28       ` Rajagopal Ananthanarayanan
2000-05-09  2:33       ` Linus Torvalds
2000-05-09  3:31         ` Rajagopal Ananthanarayanan
2000-05-09 15:56           ` [DATAPOINT] pre7-8 swaps with FREE mem? Benjamin Redelings I
2000-05-06 20:12   ` PG_referenced and lru_cache (cpu%) Roger Larsson
2000-05-06 18:31     ` Rik van Riel
2000-05-06 22:16       ` Roger Larsson
2000-05-05  8:07 [DATAPOINT] pre7-6 will not swap Benjamin Redelings I

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=Pine.LNX.4.10.10005071048120.30202-100000@cesium.transmeta.com \
    --to=torvalds@transmeta.com \
    --cc=ananth@sgi.com \
    --cc=bredelin@ucla.edu \
    --cc=linux-mm@kvack.org \
    --cc=riel@nl.linux.org \
    /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