public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Tomasz Chmielewski <mangoo@wpkg.org>
Cc: Nolan <nolan@sigbus.net>, kvm@vger.kernel.org
Subject: Re: Live memory allocation?
Date: Mon, 30 Mar 2009 16:48:36 +0300	[thread overview]
Message-ID: <49D0CDB4.1010706@redhat.com> (raw)
In-Reply-To: <49D0CBCA.3000808@wpkg.org>

Tomasz Chmielewski wrote:
>
> What about cache/buffers sharing between the host kernel and running 
> processes?
>
>
> If I'm not mistaken, right now, memory is "wasted" by caching the same 
> data by host and guest kernels.
>
> For example, let's say we have a host with 2 GB RAM and it runs a 1 GB 
> guest.
> If we read ~900 MB file_1 (block device) on guest, then:
> - guest's kernel will cache file_1
> - host's kernel will cache the same area of file_1 (block device)
>
> Now, if we want to read ~900 MB file_2 (or lots of files with that 
> size), cache for file_1 will be emptied on both guest and host as we 
> read file_2.
> Ideal situation would be if host and guest caches could be "shared", 
> to a degree (and have both file_1 and file_2 in memory, doesn't matter 
> if it's guest or host).

Double caching is indeed a bad idea.  That's why you have cache=off 
(though it isn't recommended with qcow2).

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2009-03-30 13:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26 13:44 Live memory allocation? Evert
2009-03-26 14:01 ` Tomasz Chmielewski
2009-03-26 14:04   ` Izik Eidus
2009-03-26 14:11     ` Tomasz Chmielewski
2009-03-26 17:47       ` Evert
2009-03-28 13:38       ` Alberto Treviño
2009-03-28 17:17         ` Brian Jackson
2009-03-30 13:23           ` Alberto Treviño
2009-03-30 15:48             ` Brian Jackson
2009-03-28 18:25         ` Nolan
2009-03-29 12:33           ` Avi Kivity
2009-03-30 13:40             ` Tomasz Chmielewski
2009-03-30 13:48               ` Avi Kivity [this message]
2009-03-30 13:55                 ` Tomasz Chmielewski
2009-03-30 14:58                   ` Avi Kivity
2009-03-30 15:15                     ` Tomasz Chmielewski
2009-03-30 15:18                       ` Javier Guerra
2009-03-31  9:30                         ` Tomasz Chmielewski

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=49D0CDB4.1010706@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mangoo@wpkg.org \
    --cc=nolan@sigbus.net \
    /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