linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <H.H.vanRiel@phys.uu.nl>
To: Andrea Arcangeli <arcangeli@mbox.queen.it>
Cc: Linux MM <linux-mm@kvack.org>,
	Linux Kernel <linux-kernel@vger.rutgers.edu>
Subject: Re: cp file /dev/zero <-> cache [was Re: increasing page size]
Date: Sun, 5 Jul 1998 21:31:56 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.3.96.980705212422.2416D-100000@mirkwood.dummy.home> (raw)
In-Reply-To: <Pine.LNX.3.96.980705202128.12985B-100000@dragon.bogus>

On Sun, 5 Jul 1998, Andrea Arcangeli wrote:
> On Sun, 5 Jul 1998, Rik van Riel wrote:
> 
> >The cache is also mapped into a process'es address space.
> >Currently we would have to walk all pagetables to find a
> >specific page ;(
> 
> I start to think that the problem is kswapd. Running cp file /dev/null the
> system remains fluid (when press a key I see the char on the _console_) 
> until there is free (wasted because not used) memory. While there is free
> memory the swap is 0. When the free memory finish, the system die and when
> I press a key I don' t see the character on the screen immediatly. I think
> that it' s kswapd that is irratiting me. So now I am trying to fuck kswapd
> (I am starting to hate it since I really hate swap ;-). kswapd must swap
> _nothing_ if _freeable_ cache memory is allocated.  kswapd _must_ consider
> freeable cache memory as _free_ not used memory and so it must not start
> swapping out useful code and data for make space for allocating more
> cache.  With 2.0.34 when the cache eat all free memory nothing gone
> swapped out and all perform better.

A few months ago someone (who?) posted a patch that modified
kswapd's internals to only unmap clean pages when told to.

If I can find the patch, I'll integrate it and let kswapd
only swap clean pages when:
- page_cache_size * 100 > num_physpages * page_cache.borrow_percent
or
- (buffer_mem >> PAGE_SHIFT) * 100 > num_physpages * buffermem.borrow_percent

> >shrink_mmap() can only shrink unlocked and clean buffer pages
> >and unmapped cache pages. We need to go through either bdflush
> ...unmapped cache pages. Good.

Not good, it means that kswapd needs to unmap the pages
first, using the try_to_swap_out() function. [which really
needs to be renamed to try_to_unmap()]

> >(for buffer) or try_to_swap_out() first, in order to make some
> try_to_swap_out() should unmap the cache pages? Then I had to recall
> shrink_mmap()?

Shrink_mmap() frees the pages that are already unmapped
by try_to_swap_out(). This means that the pages need to
be handled by both functions (which is good, because it
gives us a second 'timeout' for page aging).

> Rik reading vmscan.c I noticed that you are the one that worked on kswapd
> (for example removing hard page limits and checking instead
> free_memory_available(nr)). Could you tell me what you changed (or in
> which kernel-patch I can find the kswapd patches) to force kswapd to swap
> so much? 

Most of the patches are on my homepage, you can get
and read them there...

Rik.
+-------------------------------------------------------------------+
| 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-07-05 19:37 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.3.96.980705072829.17879D-100000@mirkwood.dummy.home>
1998-07-05 11:32 ` Andrea Arcangeli
1998-07-05 17:00   ` Rik van Riel
1998-07-05 18:38     ` Andrea Arcangeli
1998-07-05 19:31       ` Rik van Riel [this message]
1998-07-06 10:38         ` Stephen C. Tweedie
1998-07-06 11:42           ` Rik van Riel
1998-07-06 14:20         ` Andrea Arcangeli
1998-07-06 10:31       ` Stephen C. Tweedie
1998-07-06 12:34         ` Andrea Arcangeli
1998-07-06 14:36           ` Stephen C. Tweedie
1998-07-06 19:28             ` Andrea Arcangeli
1998-07-07 12:01               ` Stephen C. Tweedie
1998-07-07 15:54                 ` Rik van Riel
1998-07-07 17:32                   ` Benjamin C.R. LaHaise
1998-07-08 13:54                     ` Stephen C. Tweedie
1998-07-08 21:19                       ` Andrea Arcangeli
1998-07-11 11:18                         ` Rik van Riel
1998-07-11 21:11                           ` Stephen C. Tweedie
1998-07-08 13:45                   ` Stephen C. Tweedie
1998-07-08 18:57                     ` Rik van Riel
1998-07-08 22:11                       ` Stephen C. Tweedie
1998-07-09  7:43                         ` Rik van Riel
1998-07-09 20:39                         ` Rik van Riel
1998-07-13 11:54                           ` Stephen C. Tweedie
1998-07-05 18:57     ` MOLNAR Ingo
1998-07-06 10:24     ` Stephen C. Tweedie
1998-07-06 13:37       ` Eric W. Biederman
1998-07-07 12:35         ` Stephen C. Tweedie
1998-07-09 13:01 Zachary Amsden
     [not found] <199807091442.PAA01020@dax.dcs.ed.ac.uk>
1998-07-09 18:59 ` Rik van Riel
1998-07-09 23:37   ` Stephen C. Tweedie
1998-07-10  5:57     ` Rik van Riel
1998-07-11 14:14 ` Rik van Riel
1998-07-11 21:23   ` Stephen C. Tweedie
1998-07-11 22:25     ` Rik van Riel
1998-07-13 13:23       ` Stephen C. Tweedie
1998-07-12  1:47     ` Benjamin C.R. LaHaise
1998-07-13 13:42       ` Stephen C. Tweedie
1998-07-18 22:10         ` Rik van Riel
1998-07-20 16:04           ` Stephen C. Tweedie

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.980705212422.2416D-100000@mirkwood.dummy.home \
    --to=h.h.vanriel@phys.uu.nl \
    --cc=arcangeli@mbox.queen.it \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.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