From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Izik Eidus" Subject: (no subject) Date: Sun, 12 Aug 2007 12:59:17 -0700 Message-ID: <64F9B87B6B770947A9F8391472E032160CBECF40@ehost011-8.exch011.intermedia.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C7DD1B.43974EDA" To: Return-path: Content-class: urn:content-classes:message List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C7DD1B.43974EDA Content-Type: multipart/alternative; boundary="----_=_NextPart_002_01C7DD1B.43974EDA" ------_=_NextPart_002_01C7DD1B.43974EDA Content-Type: text/plain; charset="windows-1255" Content-Transfer-Encoding: quoted-printable 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. i wrote this patch that move the guest allocated memory from the kernel = to the userspace for better management. plus in this way it will share more code for such soultion with s390 and = other archs. this is request for comment, so any idea you have please write to me. thanks ------_=_NextPart_002_01C7DD1B.43974EDA Content-Type: text/html; charset="windows-1255" Content-Transfer-Encoding: quoted-printable

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.

i wrote this patch that move the guest allocated memory from the kernel = to the userspace for better management.
plus in this way it will share more code for such soultion with s390 and = other archs.

this is request for comment, so any idea you have please write to = me.

thanks

------_=_NextPart_002_01C7DD1B.43974EDA-- ------_=_NextPart_001_01C7DD1B.43974EDA Content-Type: application/octet-stream; name="kvmctl_patch" Content-Transfer-Encoding: base64 Content-Description: kvmctl_patch Content-Disposition: attachment; filename="kvmctl_patch" ZGlmZiAtLWdpdCBhL3VzZXIva3ZtY3RsLmMgYi91c2VyL2t2bWN0bC5jCmluZGV4IDQzYjM3NGQu Lj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tZW1vcnkuZ3Vlc3RfaG9zdF9hZGRyKSB7CisJCWZwcmludGYoc3RkZXJy LCAia3ZtX2NyZWF0ZV9waHlzX21lbTogJXMiLCBzdHJlcnJvcihlcnJubykpOworCQlyZXR1cm4g MDsKKwl9CisJCisJciA9IGlvY3RsKGZkLCBLVk1fU0VUX1VTRVJfTUVNT1JZX1JFR0lPTiwgJm1l bW9yeSk7CiAJaWYgKHIgPT0gLTEpCiAJICAgIHJldHVybiAwOwogCiAJa3ZtX21lbW9yeV9yZWdp b25fc2F2ZV9wYXJhbXMoa3ZtLCAmbWVtb3J5KTsKIAotCWlmICh3cml0YWJsZSkKLQkJcHJvdCB8 PSBQUk9UX1dSSVRFOwotCi0JcHRyID0gbW1hcChOVUxMLCBsZW4sIHByb3QsIE1BUF9TSEFSRUQs IGZkLCBwaHlzX3N0YXJ0KTsKLQlpZiAocHRyID09IE1BUF9GQUlMRUQpCi0JCXJldHVybiAwOwog CXJldHVybiBwdHI7CiB9CiAK ------_=_NextPart_001_01C7DD1B.43974EDA Content-Type: application/octet-stream; name="kvm_kernel_patch" Content-Transfer-Encoding: base64 Content-Description: kvm_kernel_patch Content-Disposition: attachment; filename="kvm_kernel_patch" ZGlmZiAtLWdpdCBhL2RyaXZlcnMva3ZtL2t2bS5oIGIvZHJpdmVycy9rdm0va3ZtLmgKaW5kZXgg ZmMyN2MyZi4uYTk0NzE0ZiAxMDA2NDQKLS0tIGEvZHJpdmVycy9rdm0va3ZtLmgKKysrIGIvZHJp dmVycy9rdm0va3ZtLmgKQEAgLTQxNSw2ICs0MTUsNyBAQCBzdHJ1Y3Qga3ZtX21lbW9yeV9zbG90 IHsKIAl1bnNpZ25lZCBsb25nIGZsYWdzOwogCXN0cnVjdCBwYWdlICoqcGh5c19tZW07CiAJdW5z aWduZWQgbG9uZyAqZGlydHlfYml0bWFwOworCWludCB1c2VyX2FsbG9jOyAvKiB1c2VyIGFsbG9j YXRlZCBtZW1vcnkgKi8KIH07CiAKIHN0cnVj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ZNSU8sIDB4ODUsIHN0cnVjdCBrdm1fdHJhbnNsYXRpb24pCisjZGVmaW5lIEtWTV9JTlRF UlJVUFQgICAgICAgICAgICAgIF9JT1coS1ZNSU8sICAweDg2LCBzdHJ1Y3Qga3ZtX2ludGVycnVw dCkKKyNkZWZpbmUgS1ZNX0RFQlVHX0dVRVNUICAgICAgICAgICAgX0lPVyhLVk1JTywgIDB4ODcs IHN0cnVjdCBrdm1fZGVidWdfZ3Vlc3QpCisjZGVmaW5lIEtWTV9HRVRfTVNSUyAgICAgICAgICAg ICAgIF9JT1dSKEtWTUlPLCAweDg4LCBzdHJ1Y3Qga3ZtX21zcnMpCisjZGVmaW5lIEtWTV9TRVRf TVNSUyAgICAgICAgICAgICAgIF9JT1coS1ZNSU8sICAweDg5LCBzdHJ1Y3Qga3ZtX21zcnMpCisj ZGVmaW5lIEtWTV9TRVRfQ1BVSUQgICAgICAgICAgICAgIF9JT1coS1ZNSU8sICAweDhhLCBzdHJ1 Y3Qga3ZtX2NwdWlkKQorI2RlZmluZSBLVk1fU0VUX1NJR05BTF9NQVNLICAgICAgICBfSU9XKEtW TUlPLCAgMHg4Yiwgc3RydWN0IGt2bV9zaWduYWxfbWFzaykKKyNkZWZpbmUgS1ZNX0dFVF9GUFUg ICAgICAgICAgICAgICAgX0lPUihLVk1JTywgIDB4OGMsIHN0cnVjdCBrdm1fZnB1KQorI2RlZmlu ZSBLVk1fU0VUX0ZQVSAgICAgICAgICAgICAgICBfSU9XKEtWTUlPLCAgMHg4ZCwgc3RydWN0IGt2 bV9mcHUpCiAKICNlbmRpZgo= ------_=_NextPart_001_01C7DD1B.43974EDA Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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/ ------_=_NextPart_001_01C7DD1B.43974EDA Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel ------_=_NextPart_001_01C7DD1B.43974EDA-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: (no subject) Date: Sun, 12 Aug 2007 16:37:47 -0500 Message-ID: <1186954667.9418.19.camel@squirrel> References: <64F9B87B6B770947A9F8391472E032160CBECF40@ehost011-8.exch011.intermedia.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Izik Eidus Return-path: In-Reply-To: <64F9B87B6B770947A9F8391472E032160CBECF40-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Hi Izik, On Sun, 2007-08-12 at 12:59 -0700, 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. > > i wrote this patch that move the guest allocated memory from the > kernel to the userspace for better management. > plus in this way it will share more code for such soultion with s390 > and other archs. Do we care much about maintaining the kvmctl API? I ask because I think it would be nice to provide a pointer to kvmctl instead of having it allocate the memory. I think there are a few advantages to this. It simplifies the QEMU patch and it allows for the logic for choosing how memory is allocated to be done in QEMU. I'm thinking about things like allocating memory from hugetlbfs. Since large pages are a sparse commodity, I don't think we want to use large pages unless the user asks us to. Seems like this logic is best suited to be in QEMU to me. Otherwise, this page seems pretty good to me. There's some whitespace damage in this patch to btw. Regards, Anthony Liguori > this is request for comment, so any idea you have please write to me. > > thanks > > > > ------------------------------------------------------------------------- > 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/ > _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel ------------------------------------------------------------------------- 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/ From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Izik Eidus" Subject: FW: (no subject) Date: Sun, 12 Aug 2007 15:43:28 -0700 Message-ID: <64F9B87B6B770947A9F8391472E032160CBECF4B@ehost011-8.exch011.intermedia.net> References: <64F9B87B6B770947A9F8391472E032160CBECF40@ehost011-8.exch011.intermedia.net> <1186954667.9418.19.camel@squirrel> <64F9B87B6B770947A9F8391472E032160CBECF4A@ehost011-8.exch011.intermedia.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0895675839==" To: Return-path: Content-class: urn:content-classes:message List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --===============0895675839== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7DD32.3A108CC0" This is a multi-part message in MIME format. ------_=_NextPart_001_01C7DD32.3A108CC0 Content-Type: text/plain; charset="windows-1255" Content-Transfer-Encoding: quoted-printable -----=E4=E5=E3=F2=E4 =EE=F7=E5=F8=E9=FA----- =EE=E0=FA: Izik Eidus =F0=F9=EC=E7: =E0 12/08/2007 15:43 =E0=EC: Anthony Liguori =F0=E5=F9=E0: RE: [kvm-devel] (no subject) =20 hey Anthony, yes i think you are right. passing a pointer sound smarter to me. i dont think we should care at all about the kvmctl API, and as you said in this way it would be possible to do the memory allocation at QEMU. (this evil whitespaces ...) thanks. -----=E4=E5=E3=F2=E4 =EE=F7=E5=F8=E9=FA----- =EE=E0=FA: Anthony Liguori [mailto:anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org] =F0=F9=EC=E7: =E0 12/08/2007 14:37 =E0=EC: Izik Eidus =F2=E5=FA=F7 =EC=E9=E3=E9=F2=E4: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org =F0=E5=F9=E0: Re: [kvm-devel] (no subject) =20 Hi Izik, On Sun, 2007-08-12 at 12:59 -0700, 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. >=20 > i wrote this patch that move the guest allocated memory from the > kernel to the userspace for better management. > plus in this way it will share more code for such soultion with s390 > and other archs. Do we care much about maintaining the kvmctl API? I ask because I think it would be nice to provide a pointer to kvmctl instead of having it allocate the memory. I think there are a few advantages to this. It simplifies the QEMU patch and it allows for the logic for choosing how memory is allocated to be done in QEMU. I'm thinking about things like allocating memory from hugetlbfs. Since large pages are a sparse commodity, I don't think we want to use large pages unless the user asks us to. Seems like this logic is best suited to be in QEMU to me. Otherwise, this page seems pretty good to me. There's some whitespace damage in this patch to btw. Regards, Anthony Liguori > this is request for comment, so any idea you have please write to me. >=20 > thanks >=20 >=20 >=20 > = -------------------------------------------------------------------------= > 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/ > _______________________________________________ kvm-devel mailing list = kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org = https://lists.sourceforge.net/lists/listinfo/kvm-devel ------_=_NextPart_001_01C7DD32.3A108CC0 Content-Type: text/html; charset="windows-1255" Content-Transfer-Encoding: quoted-printable FW: [kvm-devel] (no subject)


-----=E4=E5=E3=F2=E4 =EE=F7=E5=F8=E9=FA-----
=EE=E0=FA: Izik Eidus
=F0=F9=EC=E7: =E0 12/08/2007 15:43
=E0=EC: Anthony Liguori
=F0=E5=F9=E0: RE: [kvm-devel] (no subject)

hey Anthony,
yes i think you are right.
passing a pointer sound smarter to me.
i dont think we should care at all about the kvmctl API, and as you = said
in this way it would be possible to do the memory allocation at = QEMU.

(this evil whitespaces ...)

thanks.

-----=E4=E5=E3=F2=E4 =EE=F7=E5=F8=E9=FA-----
=EE=E0=FA: Anthony Liguori [mailto:anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org] =F0=F9=EC=E7: =E0 12/08/2007 14:37
=E0=EC: Izik Eidus
=F2=E5=FA=F7 =EC=E9=E3=E9=F2=E4: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
=F0=E5=F9=E0: Re: [kvm-devel] (no subject)

Hi Izik,

On Sun, 2007-08-12 at 12:59 -0700, 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.
>
> i wrote this patch that move the guest allocated memory from = the
> kernel to the userspace for better management.
> plus in this way it will share more code for such soultion with = s390
> and other archs.

Do we care much about maintaining the kvmctl API?  I ask because I = think
it would be nice to provide a pointer to kvmctl instead of having it
allocate the memory.  I think there are a few advantages to = this.

It simplifies the QEMU patch and it allows for the logic for = choosing
how memory is allocated to be done in QEMU.  I'm thinking about = things
like allocating memory from hugetlbfs.  Since large pages are a = sparse
commodity, I don't think we want to use large pages unless the user = asks
us to.  Seems like this logic is best suited to be in QEMU to = me.

Otherwise, this page seems pretty good to me.

There's some whitespace damage in this patch to btw.

Regards,

Anthony Liguori


> this is request for comment, so any idea you have please write to = me.
>
> thanks
>
>
>
> = -------------------------------------------------------------------------=
> 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/
> _______________________________________________ kvm-devel mailing = list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://l= ists.sourceforge.net/lists/listinfo/kvm-devel



------_=_NextPart_001_01C7DD32.3A108CC0-- --===============0895675839== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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/ --===============0895675839== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============0895675839==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: (no subject) Date: Mon, 13 Aug 2007 11:10:30 +0300 Message-ID: <46C011F6.7070201@qumranet.com> References: <64F9B87B6B770947A9F8391472E032160CBECF40@ehost011-8.exch011.intermedia.net> <1186954667.9418.19.camel@squirrel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Izik Eidus , kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Anthony Liguori Return-path: In-Reply-To: <1186954667.9418.19.camel@squirrel> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Anthony Liguori wrote: > Hi Izik, > > On Sun, 2007-08-12 at 12:59 -0700, 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. >> >> i wrote this patch that move the guest allocated memory from the >> kernel to the userspace for better management. >> plus in this way it will share more code for such soultion with s390 >> and other archs. >> > > Do we care much about maintaining the kvmctl API? Not so much at this time. We will later on (it will also be a dynamic library at that time). > I ask because I think > it would be nice to provide a pointer to kvmctl instead of having it > allocate the memory. I think there are a few advantages to this. > > It simplifies the QEMU patch and it allows for the logic for choosing > how memory is allocated to be done in QEMU. I'm thinking about things > like allocating memory from hugetlbfs. Since large pages are a sparse > commodity, I don't think we want to use large pages unless the user asks > us to. Seems like this logic is best suited to be in QEMU to me. > Yes, that is one of the motivations for this patch. Indeed it is a lot closer than guest paging. However this can be modified later, let's keep this patchset small for now. -- 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/ From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Otte Subject: Re: (no subject) Date: Tue, 14 Aug 2007 12:38:14 +0200 Message-ID: <46C18616.5000005@de.ibm.com> References: <64F9B87B6B770947A9F8391472E032160CBECF40@ehost011-8.exch011.intermedia.net> Reply-To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Izik Eidus Return-path: In-Reply-To: <64F9B87B6B770947A9F8391472E032160CBECF40-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org 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? @@ -670,7 +692,8 @@ EXPORT_SYMBOL_GPL(fx_init); * Discontiguous memory is allowed, mostly for framebuffers. */ static int kvm_vm_ioctl_set_memory_region(struct kvm *kvm, - struct kvm_memory_region *mem) + struct kvm_memory_region *mem, + unsigned long guest_host_addr) { int r; gfn_t base_gfn; @@ -748,12 +771,26 @@ raced: goto out_free; memset(new.phys_mem, 0, npages * sizeof(struct page *)); - for (i = 0; i < npages; ++i) { - new.phys_mem[i] = alloc_page(GFP_HIGHUSER - | __GFP_ZERO); - if (!new.phys_mem[i]) + + if (guest_host_addr) { + unsigned long pages_num; + + new.user_alloc = 1; + down_read(¤t->mm->mmap_sem); + pages_num = get_user_pages(current, current->mm, guest_host_addr, + npages, 1, 0, new.phys_mem, NULL); + up_read(¤t->mm->mmap_sem); + if (pages_num != npages) goto out_free; - set_page_private(new.phys_mem[i],0); + } else { + new.user_alloc = 0; + for (i = 0; i < npages; ++i) { + new.phys_mem[i] = alloc_page(GFP_HIGHUSER + | __GFP_ZERO); + if (!new.phys_mem[i]) + goto out_free; + set_page_private(new.phys_mem[i],0); + } } } Do we intend to maintain both pathes in the long run, or wait until we don't care about ancient userland anymore that does'nt do the allocation on its own? ------------------------------------------------------------------------- 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/ From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Izik Eidus" Subject: FW: (no subject) Date: Tue, 14 Aug 2007 04:11:40 -0700 Message-ID: <64F9B87B6B770947A9F8391472E032160CBECF53@ehost011-8.exch011.intermedia.net> References: <64F9B87B6B770947A9F8391472E032160CBECF40@ehost011-8.exch011.intermedia.net> <46C18616.5000005@de.ibm.com> <64F9B87B6B770947A9F8391472E032160CBECF52@ehost011-8.exch011.intermedia.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1843125940==" To: Return-path: Content-class: urn:content-classes:message List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --===============1843125940== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7DE63.EBA4A30E" This is a multi-part message in MIME format. ------_=_NextPart_001_01C7DE63.EBA4A30E Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hey Carsten, about the dirty pages, i think you are right, i will look at this!. about the api, as far as i can tell yes, we are going to keep the api to = both options. (when i wrote it, i wrote it with thought about how not breaking the old = api.) thanks for the comments! :) -----Original Message----- From: Carsten Otte [mailto:cotte-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org] Sent: Tue 8/14/2007 3:38 AM To: Izik Eidus Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Subject: Re: [kvm-devel] (no subject) =20 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; +=09 + for (i =3D 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.=20 We do only need to dirty it, if the corresponding page table entry=20 indicates so (dirty bit). Did I miss something? @@ -670,7 +692,8 @@ EXPORT_SYMBOL_GPL(fx_init); * Discontiguous memory is allowed, mostly for framebuffers. */ static int kvm_vm_ioctl_set_memory_region(struct kvm *kvm, - struct kvm_memory_region *mem) + struct kvm_memory_region *mem, + unsigned long guest_host_addr) { int r; gfn_t base_gfn; @@ -748,12 +771,26 @@ raced: goto out_free; memset(new.phys_mem, 0, npages * sizeof(struct page *)); - for (i =3D 0; i < npages; ++i) { - new.phys_mem[i] =3D alloc_page(GFP_HIGHUSER - | __GFP_ZERO); - if (!new.phys_mem[i]) + =09 + if (guest_host_addr) { + unsigned long pages_num; + =09 + new.user_alloc =3D 1; + down_read(¤t->mm->mmap_sem); + pages_num =3D get_user_pages(current, current->mm, guest_host_addr, + npages, 1, 0, new.phys_mem, NULL); + up_read(¤t->mm->mmap_sem); + if (pages_num !=3D npages) goto out_free; - set_page_private(new.phys_mem[i],0); + } else { + new.user_alloc =3D 0; + for (i =3D 0; i < npages; ++i) { + new.phys_mem[i] =3D alloc_page(GFP_HIGHUSER + | __GFP_ZERO); + if (!new.phys_mem[i]) + goto out_free; + set_page_private(new.phys_mem[i],0); + } } } Do we intend to maintain both pathes in the long run, or wait until we=20 don't care about ancient userland anymore that does'nt do the=20 allocation on its own? ------_=_NextPart_001_01C7DE63.EBA4A30E Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable FW: [kvm-devel] (no subject)

hey Carsten,
about the dirty pages, i think you are right, i will look at this!.
about the api, as far as i can tell yes, we are going to keep the api to = both options.
(when i wrote it, i wrote it with thought about how not breaking the old = api.)

thanks for the comments! :)

-----Original Message-----
From: Carsten Otte [mailto:cotte-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org]
Sent: Tue 8/14/2007 3:38 AM
To: Izik Eidus
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [kvm-devel] (no subject)

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 =3D 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?



@@ -670,7 +692,8 @@ EXPORT_SYMBOL_GPL(fx_init);
   * Discontiguous memory is allowed, mostly for = framebuffers.
   */
  static int kvm_vm_ioctl_set_memory_region(struct kvm *kvm,
-       =         =         =         =           struct = kvm_memory_region *mem)
+       =         =         =         =           struct = kvm_memory_region *mem,
+       =         =         =         =         =         unsigned long = guest_host_addr)
  {
        int r;
        gfn_t base_gfn;
@@ -748,12 +771,26 @@ raced:
        =         =         goto out_free;

        =         memset(new.phys_mem, 0, = npages * sizeof(struct page *));
-       =         for (i =3D 0; i < npages; = ++i) {
-       =         =         new.phys_mem[i] =3D = alloc_page(GFP_HIGHUSER
-       =         =         =         =         =              | = __GFP_ZERO);
-       =         =         if (!new.phys_mem[i])
+       =        
+       =         if (guest_host_addr) {
+       =         =         unsigned long pages_num;
+       =         =        
+       =         =         new.user_alloc =3D 1;
+       =         =         = down_read(&current->mm->mmap_sem);
+       =         =         pages_num =3D = get_user_pages(current, current->mm, guest_host_addr,
+       =         =         =         =         =         =         =         npages, 1, 0, new.phys_mem, = NULL);
+       =         =         = up_read(&current->mm->mmap_sem);
+       =         =         if (pages_num !=3D = npages)
        =         =         =         goto out_free;
-       =         =         = set_page_private(new.phys_mem[i],0);
+       =         } else {
+       =         =         new.user_alloc =3D 0;
+       =         =         for (i =3D 0; i < npages; = ++i) {
+       =         =         =         new.phys_mem[i] =3D = alloc_page(GFP_HIGHUSER
+       =         =         =         =         =         =              | = __GFP_ZERO);
+       =         =         =         if (!new.phys_mem[i])
+       =         =         =         =         goto out_free;
+       =         =         =         = set_page_private(new.phys_mem[i],0);
+       =         =         }
        =         }
        }
Do we intend to maintain both pathes in the long run, or wait until = we
don't care about ancient userland anymore that does'nt do the
allocation on its own?



------_=_NextPart_001_01C7DE63.EBA4A30E-- --===============1843125940== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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/ --===============1843125940== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============1843125940==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: user-allocated memory Date: Tue, 14 Aug 2007 14:52:24 +0300 Message-ID: <46C19778.4090502@qumranet.com> References: <64F9B87B6B770947A9F8391472E032160CBECF40@ehost011-8.exch011.intermedia.net> <46C18616.5000005@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Izik Eidus , kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org Return-path: In-Reply-To: <46C18616.5000005-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.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/ From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Otte Subject: Re: user-allocated memory Date: Tue, 14 Aug 2007 14:54:12 +0200 Message-ID: <46C1A5F4.4070006@de.ibm.com> References: <64F9B87B6B770947A9F8391472E032160CBECF40@ehost011-8.exch011.intermedia.net> <46C18616.5000005@de.ibm.com> <46C19778.4090502@qumranet.com> Reply-To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org, Izik Eidus , kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Avi Kivity Return-path: In-Reply-To: <46C19778.4090502-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Avi Kivity wrote: > 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...). As far as I undstand this code, this function is used to release a memory page. Hopefully at this time the guest has not set up any page table entries to this page, because we're releasing the target page. When the guest migrates the dirty bit from its pte to its struct page (it always does this at least when removing the pte), we could indicate this to the hypervisor e.g. via hypercall. This way the hypervisor would know if the page is dirty or not, without asking the guest if the guest is paravirtual. That said, for ept/npt/s390 we have the information anyway without the need to do above trick, due to the double dirty/reference tracking approach. That would also work for non-paravirtual guests in that case. ------------------------------------------------------------------------- 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/ From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: user-allocated memory Date: Tue, 14 Aug 2007 16:01:55 +0300 Message-ID: <46C1A7C3.6050809@qumranet.com> References: <64F9B87B6B770947A9F8391472E032160CBECF40@ehost011-8.exch011.intermedia.net> <46C18616.5000005@de.ibm.com> <46C19778.4090502@qumranet.com> <46C1A5F4.4070006@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Izik Eidus , kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org Return-path: In-Reply-To: <46C1A5F4.4070006-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Carsten Otte wrote: > Avi Kivity wrote: >> 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...). > As far as I undstand this code, this function is used to release a > memory page. Hopefully at this time the guest has not set up any page > table entries to this page, because we're releasing the target page. > When the guest migrates the dirty bit from its pte to its struct page > (it always does this at least when removing the pte), we could > indicate this to the hypervisor e.g. via hypercall. This way the > hypervisor would know if the page is dirty or not, without asking the > guest if the guest is paravirtual. > That said, for ept/npt/s390 we have the information anyway without the > need to do above trick, due to the double dirty/reference tracking > approach. That would also work for non-paravirtual guests in that case. We can actually make it work for non-paravirt, non-npt as well; when removing the shadow pte, set the page dirty bit. I forgot that the gfn is immaterial for this. -- 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/