From: Rik van Riel <riel@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-mm@kvack.org, sjiang@cs.wm.edu
Subject: Re: [PATCH] token based thrashing control
Date: Sun, 1 Aug 2004 17:52:00 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0408011747240.13053@dhcp030.home.surriel.com> (raw)
In-Reply-To: <20040801040553.305f0275.akpm@osdl.org>
On Sun, 1 Aug 2004, Andrew Morton wrote:
> Rik van Riel <riel@redhat.com> wrote:
> >
> > The following experimental patch implements token based thrashing
> > protection,
>
> Thanks for this - it is certainly needed.
I'm glad you like it ;)
> As you say, qsbench throughput is greatly increased (4x here). But the old
> `make -j4 vmlinux' with mem=64m shows no benefit at all.
I tested increasing make loads on my system here. The system
is a dual pIII with 384MB RAM and a 180MB named daemon in the
background.
With -j 10, 20, 30, 40 and 50 the patch didn't make much of a
difference at all. However, with 'make -j 60' it sped up the
average compile time about a factor of 2, from 1:20 down to
40 minutes. CPU consumption also went up from ~26% to over 50%.
> I figured it was the short-lived processes, so I added the below, which
> passes the token to the child across exec, and back to the parent on exit.
> Although it appears to work correctly, it too make no difference.
I've got some ideas for potential improvement, too. However,
I'd like to get the simplest code tested first ;)
> btw, in page_referenced_one():
>
> + if (mm != current->mm && has_swap_token(mm))
> + referenced++;
>
> what's the reason for the `mm != current->mm' test?
It's possible that the process that's currently holding
the token wants more memory than the system has available.
In that case it needs to be able to page part of itself
out of memory, otherwise the system will deadlock until
the moment where the token is handed off to the next
task...
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan
--
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-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next prev parent reply other threads:[~2004-08-01 21:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-30 21:37 Rik van Riel
2004-07-31 11:34 ` Nikita Danilov
2004-07-31 11:43 ` Rik van Riel
2004-08-01 11:05 ` Andrew Morton
2004-08-01 11:13 ` Arjan van de Ven
2004-08-01 21:52 ` Rik van Riel [this message]
2004-08-01 13:02 ` Rik van Riel
2004-08-02 0:56 ` Andrew Morton
2004-08-02 1:36 ` Rik van Riel
2004-08-02 2:52 ` Con Kolivas
2004-08-02 3:33 ` Rik van Riel
2004-08-02 5:13 ` Con Kolivas
2004-08-02 5:18 ` Con Kolivas
2004-08-03 0:34 ` Song Jiang
2004-08-03 1:20 ` Rik van Riel
2004-08-04 4:51 ` Song Jiang
2004-08-04 11:30 ` 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.4.58.0408011747240.13053@dhcp030.home.surriel.com \
--to=riel@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-mm@kvack.org \
--cc=sjiang@cs.wm.edu \
/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