From: Christoph Rohland <cr@sap.com>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: shm swapping in 2.4 again
Date: 15 Nov 2000 10:19:48 +0100 [thread overview]
Message-ID: <qwwpujx383v.fsf@sap.com> (raw)
Hi Rik et al,
here I am again. I investigated more into the shm swapping in 2.4 and
discovered the following things:
- shm_swap is called from swap_out. Actually on my machine after a
while it only gets called without __GFP_IO set, which means it will
not do anything which again leads to deadlock.
- I changed shm_swap to not have a priority but to try to free a
number of pages. It will return the number of freed pages to the
caller. This seems to be more reasonable than simply scanning part
of he available memory. (I cleaned up shm.c a lot to do this...)
- If I call this from page_launder it will work much better, but after a
while it gets stuck on prepare_highmem_swapout and will again lock
up under heavy load.
I see basically two ways to go:
1) try to make shm_swap more intelligent which pages to pick in
itself. This would e.g. mean to build its own page list with lowmem
pages queued before highmem and scanning this list instead the list
of shm segments. But still the global vm will have balancing issues
if you have loads of shm in use. The global vm also seems to be
very bad at ummapping the oages from process contexts. I see a lot
of false tries due to page_count > 1.
2) Integrating it into the global lru lists and/or the page cache.
I think the second approach is the way to go but I do not understand
the global lru list handling enough to do this and I do not know if we
can do this in the short time.
I append a patch which implements the above mentioned changes. It is
not ready yet, but functional.
Comments?
Christoph
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2000-11-15 9:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-15 9:19 Christoph Rohland [this message]
2000-11-15 9:21 ` shm swapping in 2.4 again Christoph Rohland
2000-11-15 15:19 ` Rik van Riel
2000-11-15 20:52 ` Christoph Rohland
2000-11-15 21:04 ` Rik van Riel
2000-11-16 8:17 ` Christoph Rohland
2000-11-16 12:01 ` Rik van Riel
2000-11-16 19:17 ` Christoph Rohland
2000-11-16 21:31 ` Christoph Rohland
2000-11-16 21:30 ` Rik van Riel
2000-11-17 8:08 ` Christoph Rohland
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=qwwpujx383v.fsf@sap.com \
--to=cr@sap.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
/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