From: BlaisorBlade <blaisorblade_spam@yahoo.it>
To: Jeff Dike <jdike@addtoit.com>, William Stearns <wstearns@pobox.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] Swapping directly to host swap area?
Date: Thu, 5 Feb 2004 17:59:03 +0100 [thread overview]
Message-ID: <200402051759.03917.blaisorblade_spam@yahoo.it> (raw)
In-Reply-To: <200401280439.i0S4dMZw005517@ccure.user-mode-linux.org>
Alle 05:39, mercoledì 28 gennaio 2004, Jeff Dike ha scritto:
> > In the current setup, the host kernel sees this as a normal
> > write to an open file, caching it in the process and so not truly
> > freeing up the ram for a bit.
>
> This is, and this could be done by setting O_DIRECT on UML swap devices.
> That way, writes go directly (and asynchronously) to the device without
> landing in the cache.
>
> With mmap in effect, this can also be done with a MADVISE_DONTNEED on the
> relevant pages of the swap file.
>
> Patches cheerfully accepted.
About this, my idea was that using swap both on the host and on the guests is
not very useful:
- because the host already sees which pages are accessed and which not (an
access inside UML is an access inside the host); the only difference is that
the host can swap even the guest kernel, while UML not;
- because that probably creates overhead: page aging probably has little one
(it should be possible to disable it with CONFIG_SWAP=n), but since UML (if I
understand correctly) needs to trap a SIGSEGV (which is slow, according to
what you say about TT and SKAS) from a page access to swap in a page, while
the host does this in hardware, my opinion is that you would probably disable
swap inside UML. Swap on the host means just that the host will cache datas
instead of keeping in memory UML pages, if you don't give to the guests more
than the physical memory; but this makes sense, IMHO. When you have different
customers on the same host, there is a problem, but then they can choose
differently (even because this doesn't constrast with the changes to code
suggested above).
I think this is correct even when /dev/anon is used, but I'm not very sure for
it.
--
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.23/2.6.0 on an i686; Linux registered user n. 292729
EOSIGN
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2004-02-05 18:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-25 23:34 [uml-devel] Swapping directly to host swap area? William Stearns
2004-01-27 3:01 ` Dan Shearer
2004-01-28 4:39 ` Jeff Dike
2004-01-28 14:01 ` [uml-devel] O_DIRECT (was: Swapping directly to host swap area?) Goetz Bock
2004-01-30 17:27 ` Jeff Dike
2004-02-05 16:59 ` BlaisorBlade [this message]
2004-02-11 0:43 ` [uml-devel] Swapping directly to host swap area? Jeff Dike
2004-02-12 19:08 ` BlaisorBlade
2004-02-12 21:36 ` Jeff Dike
2004-03-19 5:51 ` William Stearns
2004-03-19 16:58 ` Matt Ayres
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=200402051759.03917.blaisorblade_spam@yahoo.it \
--to=blaisorblade_spam@yahoo.it \
--cc=jdike@addtoit.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=wstearns@pobox.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