Re: [kvm-devel] [RFC 7/8]KVM: swap out guest pages

2007-07-25 Thread Avi Kivity
Shaohua Li wrote: >> So write to a file, right? Yes, it can avoid use move to swap, and >> should be feasible. > Say you want to write guest pages out to file A of back store fs, in > kvm->writepage(), we could do: > 1. lower_page = grap_cache_page(file A's mapping) > 2. file A's

Re: [kvm-devel] [RFC 7/8]KVM: swap out guest pages

2007-07-25 Thread Shaohua Li
2007/7/25, Shaohua Li <[EMAIL PROTECTED]>: 2007/7/24, Avi Kivity <[EMAIL PROTECTED]>: > Shaohua Li wrote: > > Make KVM guest pages be allocated dynamically and able to be swaped out. > > > > One issue: all inodes returned from anon_inode_getfd are shared, > > if one module changes field of the

Re: [kvm-devel] [RFC 7/8]KVM: swap out guest pages

2007-07-25 Thread Shaohua Li
2007/7/24, Avi Kivity <[EMAIL PROTECTED]>: Shaohua Li wrote: > Make KVM guest pages be allocated dynamically and able to be swaped out. > > One issue: all inodes returned from anon_inode_getfd are shared, > if one module changes field of the inode, other moduels might break. > Should we

Re: [kvm-devel] [RFC 7/8]KVM: swap out guest pages

2007-07-25 Thread Shaohua Li
2007/7/24, Avi Kivity [EMAIL PROTECTED]: Shaohua Li wrote: Make KVM guest pages be allocated dynamically and able to be swaped out. One issue: all inodes returned from anon_inode_getfd are shared, if one module changes field of the inode, other moduels might break. Should we introduce a new

Re: [kvm-devel] [RFC 7/8]KVM: swap out guest pages

2007-07-25 Thread Avi Kivity
Shaohua Li wrote: So write to a file, right? Yes, it can avoid use move to swap, and should be feasible. Say you want to write guest pages out to file A of back store fs, in kvm-writepage(), we could do: 1. lower_page = grap_cache_page(file A's mapping) 2. file A's -prepare_write(lower_page)

Re: [kvm-devel] [RFC 7/8]KVM: swap out guest pages

2007-07-25 Thread Shaohua Li
2007/7/25, Shaohua Li [EMAIL PROTECTED]: 2007/7/24, Avi Kivity [EMAIL PROTECTED]: Shaohua Li wrote: Make KVM guest pages be allocated dynamically and able to be swaped out. One issue: all inodes returned from anon_inode_getfd are shared, if one module changes field of the inode, other

Re: [RFC 7/8]KVM: swap out guest pages

2007-07-24 Thread Avi Kivity
Shaohua Li wrote: Make KVM guest pages be allocated dynamically and able to be swaped out. One issue: all inodes returned from anon_inode_getfd are shared, if one module changes field of the inode, other moduels might break. Should we introduce a new API to not share inode? Signed-off-by:

Re: [RFC 7/8]KVM: swap out guest pages

2007-07-24 Thread Avi Kivity
Shaohua Li wrote: Make KVM guest pages be allocated dynamically and able to be swaped out. One issue: all inodes returned from anon_inode_getfd are shared, if one module changes field of the inode, other moduels might break. Should we introduce a new API to not share inode? Signed-off-by:

Re: [RFC 7/8]KVM: swap out guest pages

2007-07-23 Thread Avi Kivity
Shaohua Li wrote: >>> >>> >> You're not removing any shadows of the page, in case that page is a >> guest page table. But I don't see anything wrong with it -- the page >> won't change while it's in swap. >> > You are right. Should we? > I don't think so. It's just strange to

Re: [RFC 7/8]KVM: swap out guest pages

2007-07-23 Thread Shaohua Li
On Mon, 2007-07-23 at 19:32 +0800, Avi Kivity wrote: > Shaohua Li wrote: > > Make KVM guest pages be allocated dynamically and able to be swaped > out. > > > > One issue: all inodes returned from anon_inode_getfd are shared, > > if one module changes field of the inode, other moduels might break.

Re: [RFC 7/8]KVM: swap out guest pages

2007-07-23 Thread Avi Kivity
Shaohua Li wrote: Make KVM guest pages be allocated dynamically and able to be swaped out. One issue: all inodes returned from anon_inode_getfd are shared, if one module changes field of the inode, other moduels might break. Should we introduce a new API to not share inode? Signed-off-by:

[RFC 7/8]KVM: swap out guest pages

2007-07-23 Thread Shaohua Li
Make KVM guest pages be allocated dynamically and able to be swaped out. One issue: all inodes returned from anon_inode_getfd are shared, if one module changes field of the inode, other moduels might break. Should we introduce a new API to not share inode? Signed-off-by: Shaohua Li <[EMAIL

[RFC 7/8]KVM: swap out guest pages

2007-07-23 Thread Shaohua Li
Make KVM guest pages be allocated dynamically and able to be swaped out. One issue: all inodes returned from anon_inode_getfd are shared, if one module changes field of the inode, other moduels might break. Should we introduce a new API to not share inode? Signed-off-by: Shaohua Li [EMAIL

Re: [RFC 7/8]KVM: swap out guest pages

2007-07-23 Thread Avi Kivity
Shaohua Li wrote: Make KVM guest pages be allocated dynamically and able to be swaped out. One issue: all inodes returned from anon_inode_getfd are shared, if one module changes field of the inode, other moduels might break. Should we introduce a new API to not share inode? Signed-off-by:

Re: [RFC 7/8]KVM: swap out guest pages

2007-07-23 Thread Shaohua Li
On Mon, 2007-07-23 at 19:32 +0800, Avi Kivity wrote: Shaohua Li wrote: Make KVM guest pages be allocated dynamically and able to be swaped out. One issue: all inodes returned from anon_inode_getfd are shared, if one module changes field of the inode, other moduels might break. Should

Re: [RFC 7/8]KVM: swap out guest pages

2007-07-23 Thread Avi Kivity
Shaohua Li wrote: You're not removing any shadows of the page, in case that page is a guest page table. But I don't see anything wrong with it -- the page won't change while it's in swap. You are right. Should we? I don't think so. It's just strange to have shadows for