linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <H.H.vanRiel@phys.uu.nl>
To: Zlatko Calusic <Zlatko.Calusic@CARNet.hr>
Cc: "Stephen C. Tweedie" <sct@redhat.com>, Linux MM <linux-mm@kvack.org>
Subject: Re: [PATCH] swapin readahead
Date: Tue, 1 Dec 1998 17:42:08 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.3.96.981201173030.2458A-100000@mirkwood.dummy.home> (raw)
In-Reply-To: <87lnkrn9nb.fsf@atlas.CARNet.hr>

On 1 Dec 1998, Zlatko Calusic wrote:
> "Stephen C. Tweedie" <sct@redhat.com> writes:
> > In article <Pine.LNX.3.96.981127001214.445A-100000@mirkwood.dummy.home>,
> > Rik van Riel <H.H.vanRiel@phys.uu.nl> writes:
> > 
> > > here is a very first primitive version of as swapin
> > > readahead patch. It seems to give much increased
> > > throughput to swap and the desktop switch time has
> > > decreased noticably.
> > 
> > There's a third check needed, I think, which probably accounts for the
> > swap_duplicate errors people have been noting.  You need to skip pages
> > which are marked as locked in the swap_lockmap, or the async page read
> 
> That warnings are probably benign, but the patch in the whole has at
> least one big engineering problem. Unfortunately, I'm trying to
> understand other parts of the MM code, so currently I don't have the
> time needed to play with the swapin readahead more.
> 
> But, what I observed is that memory gets lost in some strange way. It
> is possible that lost pages are in the swap cache, and it looks like
> nothing frees them at all.

I've observed this problem as well, but I haven't figured
out the cause yet...

> I don't understand how Rik doesn't notice this, but I'm able to
> deadlock machine in a matter of minutes, by running simple memory
> mallocing & reading program.

In my experience allocations aren't the big problem but
deallocations. I guess we lose some memory there :(

> Call it hogmem.c, compile it and then run it with two arguments. First
> is how much memory to allocate (make it slightly bigger than size of
> your physical memory in MB, to make system swapping), and second is
> how many times to read the memory (some small number).

> Rik, hopefully this helps you to find a problem with logic in your
> patch.

I'll check it out and report later.

> Also, looking at the patch source, it looks like the comment there is
> completely misleading, as the for() loop is not doing anything, at
> all. The patch can be shortened to do offset++, if() and only ONE
> read_swap_cache_async, if I'm understanding it correctly. Sorry, I'm
> not including it here, have some other things to do fast.

You have to read each entry separately; you want all of
them to have an entry in the swap cache...

[SNIP program]

Hmm, reading and writing huge amounts of memory repeatedly
makes memory dissapear and deadlock the machine... This
means we are losing memory somewhere -- I'll check things
out very carefully...

cheers,

Rik -- now completely used to dvorak kbd layout...
+-------------------------------------------------------------------+
| Linux memory management tour guide.        H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader.      http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+

--
This is a majordomo managed list.  To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org

  reply	other threads:[~1998-12-01 17:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-26 23:23 Rik van Riel
1998-12-01 15:13 ` Stephen C. Tweedie
1998-12-01 15:41   ` Rik van Riel
1998-12-01 15:51   ` Zlatko Calusic
1998-12-01 16:42     ` Rik van Riel [this message]
1998-12-01 17:20       ` Zlatko Calusic
1998-12-01 18:32         ` Rik van Riel
1998-12-02 17:35           ` Stephen C. Tweedie
1998-12-02 21:18             ` Zlatko Calusic
1998-12-03  5:25               ` Eric W. Biederman
1998-12-03  8:55                 ` Zlatko Calusic
1998-12-03 15:39                   ` Eric W. Biederman
1998-12-03 10:07                 ` Rik van Riel
1998-12-02 17:33         ` Stephen C. Tweedie
1998-12-03 14:44           ` Rik van Riel

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.3.96.981201173030.2458A-100000@mirkwood.dummy.home \
    --to=h.h.vanriel@phys.uu.nl \
    --cc=Zlatko.Calusic@CARNet.hr \
    --cc=linux-mm@kvack.org \
    --cc=sct@redhat.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