linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Zlatko Calusic <zlatko@iskon.hr>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-mm@kvack.org
Subject: Re: pre2 swap_out() changes
Date: 13 Jan 2001 12:41:38 +0100	[thread overview]
Message-ID: <873denhe6l.fsf@atlas.iskon.hr> (raw)
In-Reply-To: Marcelo Tosatti's message of "Fri, 12 Jan 2001 17:22:17 -0200 (BRST)"

Marcelo Tosatti <marcelo@conectiva.com.br> writes:

> On Fri, 12 Jan 2001, Linus Torvalds wrote:
> 
> > That's an effect of replacing "wakeup_kswapd(1)" with shrinking the inode
> > and dentry caches and page_launder(), and it is probably the nicest kernel
> > for stuff that wants to avoid caching stuff excessively. But it does mean
> > that we don't try to swap stuff out very much, and it also means that we
> > end up shrinking the directory cache in particular more aggressively than
> > before. Which is bad.
> > 
> > I really think that that page_launder() should be a "try_to_free_page()"
> > instead.
> 
> Linus,
> 
> do_try_to_free_pages() will shrink the caches too, so I'm not sure if that
> is the reason for the slowdown Zlatko is seeing. 
> 
> I dont understand the following changes you've done to try_to_swapout() in
> pre2 (as someone previously commented on this thread): 
> 
> -   onlist = PageActive(page);
>     /* Don't look at this pte if it's been accessed recently. */
>     if (ptep_test_and_clear_young(page_table)) {
> -       age_page_up(page);
> -       goto out_failed;
> +       page->age += PAGE_AGE_ADV;
> +       if (page->age > PAGE_AGE_MAX)
> +           page->age = PAGE_AGE_MAX;
> +       return;
>     }
> -   if (!onlist)
> -       /* The page is still mapped, so it can't be freeable... */
> -       age_page_down_ageonly(page);
> -
> -   /*
> -    * If the page is in active use by us, or if the page
> -    * is in active use by others, don't unmap it or
> -    * (worse) start unneeded IO.
> -    */
> -   if (page->age > 0)
> -       goto out_failed;
> 
> 
> First, age_page_up() will move the page to the active list if it was not
> active before and your change simply increases the page age.
> 
> Secondly, you removed the "(page->age > 0)" check which is obviously
> correct to me (we don't want to unmap the page if it does not have age 0)
> 
> The third thing is that we dont age down pages anymore. (ok, the
> "onlist" thing was wrong, but anyway...)
> 
> The patch I posted previously to add background pte scanning changed this
> stuff. 
> 
> Zlatko, could you try
> http://bazar.conectiva.com.br/~marcelo/patches/v2.4/2.4.1pre2/bg_cond_pte_aging.patch
> and report results?
> 

2.2.17     -> make -j32  392.49s user 47.87s system 168% cpu 4:21.13 total
2.4.0      -> make -j32  389.59s user 31.29s system 182% cpu 3:50.24 total
2.4.0-pre2 -> make -j32  393.32s user 138.20s system 129% cpu 6:51.82 total
pre3-bgage -> make -j32  394.11s user 424.52s system 131% cpu 10:21.41 total

Hm, sorry to rain on your parade, but it actually made things even
worse. Notice how the system time is getting bigger with every try.

I also took an opportunity to check your swap-write-clustering patch
(you've been sending for some time to linux-kernel :)) but over the
last good performing 2.4.0 VM, but it also reduces performance and
after some testing it deadlocked.

-- 
Zlatko
--
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/

  parent reply	other threads:[~2001-01-13 11:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-11 10:38 Marcelo Tosatti
2001-01-11 18:49 ` Linus Torvalds
2001-01-12 11:35   ` Zlatko Calusic
2001-01-12 19:45     ` Linus Torvalds
2001-01-12 19:22       ` Marcelo Tosatti
2001-01-13  0:23         ` Linus Torvalds
2001-01-12 22:41           ` Marcelo Tosatti
2001-01-13  0:45             ` Linus Torvalds
2001-01-17  7:05             ` Rik van Riel
2001-01-18 11:54           ` Rik van Riel
2001-01-13 11:41         ` Zlatko Calusic [this message]
2001-01-17  7:08           ` Rik van Riel
2001-01-13 11:51       ` Zlatko Calusic
2001-01-14  2:39         ` Marcelo Tosatti
2001-01-14  4:36           ` Linus Torvalds
2001-01-14  3:50             ` Marcelo Tosatti
2001-01-14 15:51               ` Ed Tomlinson
2001-01-14 14:13                 ` Marcelo Tosatti
2001-01-14 16:15                   ` Zlatko Calusic
2001-01-14 17:22                     ` Zlatko Calusic
2001-01-17  7:16                       ` Rik van Riel
2001-01-17  7:15                 ` Rik van Riel
2001-01-17  7:12               ` Rik van Riel
2001-01-11 20:52 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=873denhe6l.fsf@atlas.iskon.hr \
    --to=zlatko@iskon.hr \
    --cc=linux-mm@kvack.org \
    --cc=marcelo@conectiva.com.br \
    --cc=torvalds@transmeta.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