All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org
Cc: Izik Eidus <izik.eidus-atKUWr5tajBWk0Htik3J/w@public.gmane.org>,
	kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: user-allocated memory
Date: Tue, 14 Aug 2007 14:52:24 +0300	[thread overview]
Message-ID: <46C19778.4090502@qumranet.com> (raw)
In-Reply-To: <46C18616.5000005-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>

Carsten Otte wrote:
> Izik Eidus wrote:
>   
>> we are working on swapping support for the guests in kvm.
>> we want to allow management of the memory swapping of the guests from kvm.
>>     
> This is excellent, thank you!
>
>   
>> this is request for comment, so any idea you have please write to me.
>>     
> I ran into a few while reading the code:
>
> +static void kvm_free_userspace_physmem(struct kvm_memory_slot *free)
> +{
> +	int i;
> +	
> +	for (i = 0; i < free->npages; ++i) {
> +		if (free->phys_mem[i]) {
> +			if (!PageReserved(free->phys_mem[i]))
> +				SetPageDirty(free->phys_mem[i]);
> +			page_cache_release(free->phys_mem[i]);
> +		}
> +	}
> +}
> I don't see why we would want to dirty a page we release in general. 
> We do only need to dirty it, if the corresponding page table entry 
> indicates so (dirty bit). Did I miss something?
>
>   

kvm only tracks dirty bits if requested by userspace (for live 
migration).  Checking the pte is not so easy because the pte contains 
only host addresses, not page addresses (well, we could consult the 
guest page table, but...).

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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

  parent reply	other threads:[~2007-08-14 11:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-12 19:59 (no subject) Izik Eidus
     [not found] ` <64F9B87B6B770947A9F8391472E032160CBECF40-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-08-12 21:37   ` Anthony Liguori
     [not found]     ` <64F9B87B6B770947A9F8391472E032160CBECF4A@ehost011-8.exch011.intermedia.net>
2007-08-12 22:43       ` FW: " Izik Eidus
2007-08-13  8:10     ` Avi Kivity
2007-08-14 10:38   ` Carsten Otte
     [not found]     ` <64F9B87B6B770947A9F8391472E032160CBECF52@ehost011-8.exch011.intermedia.net>
2007-08-14 11:11       ` FW: " Izik Eidus
     [not found]     ` <46C18616.5000005-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-08-14 11:52       ` Avi Kivity [this message]
     [not found]         ` <46C19778.4090502-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-14 12:54           ` user-allocated memory Carsten Otte
     [not found]             ` <46C1A5F4.4070006-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-08-14 13:01               ` Avi Kivity

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=46C19778.4090502@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
    --cc=izik.eidus-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.