From: Daniel Drake <ddrake@brontes3d.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: speeding up swapoff
Date: Thu, 30 Aug 2007 11:05:16 -0400 [thread overview]
Message-ID: <1188486316.13361.23.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.64.0708301132470.26365@blonde.wat.veritas.com>
On Thu, 2007-08-30 at 11:36 +0100, Hugh Dickins wrote:
> Regarding Daniel's use of swapoff: it's a very heavy sledgehammer
> for cracking that nut, I strongly agree with those who have pointed
> him to mlock and mlockall instead.
There are some issues with us using mlockall. Admittedly, most/all of
them are not the kernels problem (but a fast swapoff would be a good
workaround):
We're using python 2.4, so mlock() itself isn't really an option (we
don't realistically have access to the address regions hidden behind the
language). mlockall() is a possibility, but the fact that all
allocations above a particular limit will fail would potentially cause
us problems given that it's hard to control python's memory usage for a
long-running application.
Additionally, choosing that limit is hard given that we have this
real-time and non-real-time processing balance, plus an interactive
python-based application that runs all the time (which is the thing we
would be locking). python 2.4 never returns memory to the OS, so at
whatever point the memory usage of the application peaks, all that
memory remains locked permanently.
In addition we have the non-real-time processing task which does benefit
from having more memory available, so in that case, we would want it to
swap out parts of the application. I guess we could ask the application
to do munlockall() here, but things start getting scary and
overcomplicated at this point...
So, our arguments against mlockall() are not strong, but you can see why
fast swapoff would be mighty convenient.
Thanks for all the info so far. It does sound like my earlier idea
wouldn't be any faster in the general case due to excess disk seeking.
Oh well...
--
Daniel Drake
Brontes Technologies, A 3M Company
http://www.brontes3d.com/opensource
--
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:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-08-30 15:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-29 13:29 Daniel Drake
2007-08-29 14:30 ` Arjan van de Ven
2007-08-29 14:36 ` Oliver Neukum
2007-08-29 16:04 ` Hugh Dickins
2007-08-29 16:18 ` Oliver Neukum
2007-08-29 14:44 ` Daniel Drake
2007-08-29 15:12 ` Juergen Beisert
2007-08-30 15:57 ` Bill Davidsen
2007-09-01 22:20 ` Andi Kleen
2007-08-29 15:58 ` Hugh Dickins
2007-08-29 15:36 ` Hugh Dickins
2007-08-30 8:27 ` Eric W. Biederman
2007-08-30 10:36 ` Hugh Dickins
2007-08-30 15:05 ` Daniel Drake [this message]
2007-08-29 16:08 ` Lee Schermerhorn
[not found] <fa.j/pO3mTWDugTdvZ3XNr9XpvgzPQ@ifi.uio.no>
[not found] ` <fa.ed9fasZXOwVCrbffkPQTX7G3a7g@ifi.uio.no>
[not found] ` <fa./NZA3biuO1+qW5pW8ybdZMDWcZs@ifi.uio.no>
2007-08-30 1:37 ` Robert Hancock
2007-08-30 13:55 ` Helge Hafting
2007-08-30 14:06 ` Xavier Bestel
2007-08-30 14:06 ` Helge Hafting
2007-08-30 14:14 ` Xavier Bestel
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=1188486316.13361.23.camel@localhost \
--to=ddrake@brontes3d.com \
--cc=ebiederm@xmission.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--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