[PATCH] KVM: Fix pit memory leak if unable to allocate irq source id

2008-11-11 Thread Avi Kivity
From: Avi Kivity [EMAIL PROTECTED] Reported-By: Daniel Marjamäki [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 37dd787..e665d1c 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c @@ -548,8 +548,10 @@ struct

[PATCH] kvm: qemu: fix kvm ppc vcpu initialization

2008-11-11 Thread Avi Kivity
From: Ehrhardt Christian [EMAIL PROTECTED] A recent patch in qemu and its merge removed the availability of kvm_init_new_ap in target-$arch. The helper files now should call kvm_init_vcpu() directly. This patch changes that for powerpc. Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED]

[PATCH] kvm: qemu: support ioperm for vcpu hotplug

2008-11-11 Thread Avi Kivity
From: Weidong Han [EMAIL PROTECTED] Track ioperm settings, when a new VCPU comes online, issue ioperm. Signed-off-by: Weidong Han [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c index e1c3372..9aa7708 100644

Re: [patch] remove vcpu_info array v5

2008-11-11 Thread Avi Kivity
Jes Sorensen wrote: Avi Kivity wrote: The code I mentioned only runs if the -no-kvm-irqchip option is passed. It's not the highest performing option... What I meant was that I was able to compile the code, and there was only one piece left that needed that function, which is why I moved it

Re: [PATCH 1/1] KVM: Fix kernel allocated memory slot

2008-11-11 Thread Hollis Blanchard
On Tue, 2008-11-11 at 15:30 +0800, Sheng Yang wrote: Commit 7fd49de9773fdcb7b75e823b21c1c5dc1e218c14 KVM: ensure that memslot userspace addresses are page-aligned broke kernel space allocated memory slot, for the userspace_addr is invalid. Signed-off-by: Sheng Yang [EMAIL PROTECTED] ---

hrtimer_start: Unknown symbol in module (kvm-78)

2008-11-11 Thread Martin Vogt
Hello list, I just downloaded kvm-78 and after I build it it writes: mediag0a:/usr/share/slg_qemu_kvm/kvm-78/kernel # modprobe kvm FATAL: Error inserting kvm (/lib/modules/2.6.16.54-0.2.5-smp/extra/kvm.ko): Unknown symbol in module, or unknown parameter (see dmesg)

Re: Boot Problem (and fix)

2008-11-11 Thread the uni
That fixed it. Thanks. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 0/4] ksm - dynamic page sharing driver for linux

2008-11-11 Thread Andrew Morton
On Tue, 11 Nov 2008 15:21:37 +0200 Izik Eidus [EMAIL PROTECTED] wrote: KSM is a linux driver that allows dynamicly sharing identical memory pages between one or more processes. unlike tradtional page sharing that is made at the allocation of the memory, ksm do it dynamicly after the memory

Re: [PATCH 0/4] ksm - dynamic page sharing driver for linux

2008-11-11 Thread Avi Kivity
Andrew Morton wrote: The whole approach seems wrong to me. The kernel lost track of these pages and then we run around post-facto trying to fix that up again. Please explain (for the changelog) why the kernel cannot get this right via the usual sharing, refcounting and COWing approaches.

Re: [PATCH 0/4] ksm - dynamic page sharing driver for linux

2008-11-11 Thread Izik Eidus
Andrew Morton wrote: On Tue, 11 Nov 2008 15:21:37 +0200 Izik Eidus [EMAIL PROTECTED] wrote: KSM is a linux driver that allows dynamicly sharing identical memory pages between one or more processes. unlike tradtional page sharing that is made at the allocation of the memory, ksm do it

Re: [PATCH 0/4] ksm - dynamic page sharing driver for linux

2008-11-11 Thread Izik Eidus
Avi Kivity wrote: Andrew Morton wrote: The whole approach seems wrong to me. The kernel lost track of these pages and then we run around post-facto trying to fix that up again. Please explain (for the changelog) why the kernel cannot get this right via the usual sharing, refcounting and

Re: [PATCH 0/4] ksm - dynamic page sharing driver for linux

2008-11-11 Thread Andrew Morton
On Tue, 11 Nov 2008 20:48:16 +0200 Avi Kivity [EMAIL PROTECTED] wrote: Andrew Morton wrote: The whole approach seems wrong to me. The kernel lost track of these pages and then we run around post-facto trying to fix that up again. Please explain (for the changelog) why the kernel cannot

Re: [PATCH] [v2] linux: virtio: Standardize virtio's concept of page size

2008-11-11 Thread Avi Kivity
Hollis Blanchard wrote: Avi, will you commit the matching qemu patch? (I'm not clear on the patch flow for kvm-userspace qemu virtio patches.) At this time, I'm accepting qemu/virtio patches (and will apply this one); once virtio is merged in qemu upstream, patches will have to go there

Re: [PATCH 0/4] ksm - dynamic page sharing driver for linux

2008-11-11 Thread Izik Eidus
Andrew Morton wrote: On Tue, 11 Nov 2008 20:48:16 +0200 Avi Kivity [EMAIL PROTECTED] wrote: Andrew Morton wrote: The whole approach seems wrong to me. The kernel lost track of these pages and then we run around post-facto trying to fix that up again. Please explain (for the

[PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Izik Eidus
From: Izik Eidus [EMAIL PROTECTED] ksm is driver that allow merging identical pages between one or more applications in way unvisible to the application that use it. pages that are merged are marked as readonly and are COWed when any application try to change them. ksm is working by walking over

Re: [PATCH 0/4] ksm - dynamic page sharing driver for linux

2008-11-11 Thread Andrew Morton
On Tue, 11 Nov 2008 21:07:10 +0200 Izik Eidus [EMAIL PROTECTED] wrote: we have used KSM in production for about half year and the numbers that came from our QA is: using KSM for desktop (KSM was tested just for windows desktop workload) you can run as many as 52 windows xp with 1 giga ram

Re: Solaris 10 x86_64 guest on kvm keeps restarting

2008-11-11 Thread Carlo Marcelo Arenas Belon
On Tue, Nov 11, 2008 at 06:51:26PM +0530, mr ashok wrote: Hi all, I have a F9 box with 2.6.27.4-58.fc10.x86_64 version installed with kvm-74-5.fc10.x86_64 installed. you are going to need a patched version of the kvm module to be able to run Solaris 10 amd64 as explained in the Guest Support

Re: [PATCH 0/4] ksm - dynamic page sharing driver for linux

2008-11-11 Thread Avi Kivity
Andrew Morton wrote: For kvm, the kernel never knew those pages were shared. They are loaded from independent (possibly compressed and encrypted) disk images. These images are different; but some pages happen to be the same because they came from the same installation media. What

Re: [PATCH 1/4] rmap: add page_wrprotect() function,

2008-11-11 Thread Andrew Morton
On Tue, 11 Nov 2008 15:21:38 +0200 Izik Eidus [EMAIL PROTECTED] wrote: From: Izik Eidus [EMAIL PROTECTED] this function is useful for cases you want to compare page and know that its value wont change during you compare it. this function is working by walking over the whole rmap of a page

[PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Izik Eidus
From: Izik Eidus [EMAIL PROTECTED] this function is needed in cases you want to change the userspace virtual mapping into diffrent physical page, KSM need this for merging the identical pages. this function is working by removing the oldpage from the rmap and calling put_page on it, and by

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Andrew Morton
On Tue, 11 Nov 2008 15:21:39 +0200 Izik Eidus [EMAIL PROTECTED] wrote: From: Izik Eidus [EMAIL PROTECTED] this function is needed in cases you want to change the userspace virtual mapping into diffrent physical page, Not sure that I understand that description. We want to replace a live

[PATCH 4/4] MMU_NOTIFIRES: add set_pte_at_notify()

2008-11-11 Thread Izik Eidus
From: Izik Eidus [EMAIL PROTECTED] this function is optimzation for kvm/users of mmu_notifiers for COW pages, it is useful for kvm when ksm is used beacuse it allow kvm not to have to recive VMEXIT and only then map the shared page into the mmu shadow pages, but instead map it directly at the

Re: Boot Problem (and fix)

2008-11-11 Thread the uni
Can you try modules from older versions (keeping userspace and the bios) to see which version introduced the fix? Keeping userspace and bios, versions 71 and up are fixed... 70 is broken. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to [EMAIL

Re: [PATCH 1/4] rmap: add page_wrprotect() function,

2008-11-11 Thread Andrea Arcangeli
On Tue, Nov 11, 2008 at 11:39:48AM -0800, Andrew Morton wrote: +static int page_wrprotect_one(struct page *page, struct vm_area_struct *vma, + int *odirect_sync) +{ + struct mm_struct *mm = vma-vm_mm; + unsigned long address; + pte_t *pte; +

Re: [PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Andrew Morton
On Tue, 11 Nov 2008 15:21:40 +0200 Izik Eidus [EMAIL PROTECTED] wrote: From: Izik Eidus [EMAIL PROTECTED] ksm is driver that allow merging identical pages between one or more applications in way unvisible to the application that use it. pages that are merged are marked as readonly and are

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Izik Eidus
Andrew Morton wrote: On Tue, 11 Nov 2008 15:21:39 +0200 Izik Eidus [EMAIL PROTECTED] wrote: From: Izik Eidus [EMAIL PROTECTED] this function is needed in cases you want to change the userspace virtual mapping into diffrent physical page, Not sure that I understand that description.

Re: [PATCH 1/4] rmap: add page_wrprotect() function,

2008-11-11 Thread Andrew Morton
On Tue, 11 Nov 2008 21:38:06 +0100 Andrea Arcangeli [EMAIL PROTECTED] wrote: + * set all the ptes pointed to a page as read only, + * odirect_sync is set to 0 in case we cannot protect against race with odirect + * return the number of ptes that were set as read only + * (ptes

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Andrea Arcangeli
On Tue, Nov 11, 2008 at 11:45:55AM -0800, Andrew Morton wrote: page migration already kinda does that. Is there common ground? btw, page_migration likely is buggy w.r.t. o_direct too (and now unfixable with gup_fast until the 2.4 brlock is added around it or similar) if it does the same thing

[PATCH 0/4] ksm - dynamic page sharing driver for linux

2008-11-11 Thread Izik Eidus
KSM is a linux driver that allows dynamicly sharing identical memory pages between one or more processes. unlike tradtional page sharing that is made at the allocation of the memory, ksm do it dynamicly after the memory was created. Memory is periodically scanned; identical pages are identified

Re: [PATCH 1/4] rmap: add page_wrprotect() function,

2008-11-11 Thread Andrea Arcangeli
On Tue, Nov 11, 2008 at 01:01:49PM -0800, Andrew Morton wrote: On Tue, 11 Nov 2008 21:38:06 +0100 Andrea Arcangeli [EMAIL PROTECTED] wrote: + * set all the ptes pointed to a page as read only, + * odirect_sync is set to 0 in case we cannot protect against race with odirect + *

Re: hrtimer_start: Unknown symbol in module (kvm-78)

2008-11-11 Thread Martin Vogt
Martin Vogt wrote: Hello list, I just downloaded kvm-78 and after I build it it writes: mediag0a:/usr/share/slg_qemu_kvm/kvm-78/kernel # modprobe kvm FATAL: Error inserting kvm (/lib/modules/2.6.16.54-0.2.5-smp/extra/kvm.ko): Unknown symbol in module, or unknown parameter (see dmesg)

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Christoph Lameter
On Tue, 11 Nov 2008, Izik Eidus wrote: yes but it replace it with kernel allocated page. page migration already kinda does that. Is there common ground? page migration as far as i saw cant migrate anonymous page into kernel page. if you want we can change page_migration to do that, but

Re: [PATCH] [v2] linux: virtio: Standardize virtio's concept of page size

2008-11-11 Thread Hollis Blanchard
On Tue, 2008-11-11 at 23:47 +1030, Rusty Russell wrote: On Tuesday 11 November 2008 10:07:09 Hollis Blanchard wrote: Both sides of the virtio interface must agree about how big a pfn really is. This is particularly an issue on architectures where the page size is configurable (e.g.

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Izik Eidus
Christoph Lameter wrote: page migration as far as i saw cant migrate anonymous page into kernel page. if you want we can change page_migration to do that, but i thought you will rather have ksm changes separate. What do you mean by kernel page? The kernel can allocate a page and then

Allocate guest memory on host page boundaries.

2008-11-11 Thread Hollis Blanchard
Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] diff --git a/osdep.c b/osdep.c index 8ff260a..30a1263 100644 --- a/osdep.c +++ b/osdep.c @@ -213,7 +213,7 @@ void *qemu_vmalloc(size_t size) #ifdef _BSD return valloc(size); #else -return memalign(4096, size); +return

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Andrea Arcangeli
On Tue, Nov 11, 2008 at 03:21:45PM -0600, Christoph Lameter wrote: What do you mean by kernel page? The kernel can allocate a page and then point a user space pte to it. That is how page migration works. Just to make an example, remove_migration_pte adds the page back to rmap layer. We can't do

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Christoph Lameter
On Tue, 11 Nov 2008, Andrea Arcangeli wrote: btw, page_migration likely is buggy w.r.t. o_direct too (and now unfixable with gup_fast until the 2.4 brlock is added around it or similar) if it does the same thing but without any page_mapcount vs page_count check. Details please?

Re: hrtimer_start: Unknown symbol in module (kvm-78)

2008-11-11 Thread Avi Kivity
Martin Vogt wrote: Hello list, I just downloaded kvm-78 and after I build it it writes: mediag0a:/usr/share/slg_qemu_kvm/kvm-78/kernel # modprobe kvm FATAL: Error inserting kvm (/lib/modules/2.6.16.54-0.2.5-smp/extra/kvm.ko): Unknown symbol in module, or unknown parameter (see dmesg)

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Izik Eidus
Christoph Lameter wrote: Currently page migration assumes that the page will continue to be part of the existing file or anon vma. exactly, and ksm really need it to get out of the existing anon vma! What you want sounds like assigning a swap pte to an anonymous page? That way a anon

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Avi Kivity
Christoph Lameter wrote: page migration requires the page to be on the LRU. That could be changed if you have a different means of isolating a page from its page tables. Isn't rmap the means of isolating a page from its page tables? I guess I'm misunderstanding something. -- I have a

Re: Boot Problem (and fix)

2008-11-11 Thread Avi Kivity
the uni wrote: Confirmed that vers 77 and 78 both work fine. Can you try modules from older versions (keeping userspace and the bios) to see which version introduced the fix? -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Christoph Lameter
On Tue, 11 Nov 2008, Izik Eidus wrote: What do you mean by kernel page? The kernel can allocate a page and then point a user space pte to it. That is how page migration works. i mean filebacked page (!AnonPage()) ok. ksm need the pte inside the vma to point from anonymous page into

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Christoph Lameter
On Tue, 11 Nov 2008, Avi Kivity wrote: Christoph Lameter wrote: page migration requires the page to be on the LRU. That could be changed if you have a different means of isolating a page from its page tables. Isn't rmap the means of isolating a page from its page tables? I guess I'm

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Izik Eidus
Christoph Lameter wrote: On Tue, 11 Nov 2008, Avi Kivity wrote: Christoph Lameter wrote: page migration requires the page to be on the LRU. That could be changed if you have a different means of isolating a page from its page tables. Isn't rmap the means of isolating a page

Re: [PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Jonathan Corbet
I don't claim to begin to really understand the deep VM side of this patch, but I can certainly pick nits as I work through it...sorry for the lack of anything more substantive. +static struct list_head slots; Some of these file-static variable names seem a little..terse... +#define

Re: [PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Andrea Arcangeli
On Tue, Nov 11, 2008 at 12:38:51PM -0800, Andrew Morton wrote: Please fully document that interface in the changelog so that we can review your decisions here. This is by far the most important consideration - we can change all the code, but interfaces are for ever. Yes, this is the most

Re: Boot Problem (and fix)

2008-11-11 Thread Avi Kivity
the uni wrote: Can you try modules from older versions (keeping userspace and the bios) to see which version introduced the fix? Keeping userspace and bios, versions 71 and up are fixed... 70 is broken. Please try kvm-70 with the attached patch attached. (from

Re: Boot Problem (and fix)

2008-11-11 Thread Avi Kivity
the uni wrote: That fixed it. Thanks. Ok. Since 2.6.25 is out of maintenance mode I suggest you forward this patch to your distro's kernel maintainers. I'll queue it for 2.6.2[67]. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Andrea Arcangeli
On Tue, Nov 11, 2008 at 03:26:57PM -0600, Christoph Lameter wrote: On Tue, 11 Nov 2008, Andrea Arcangeli wrote: btw, page_migration likely is buggy w.r.t. o_direct too (and now unfixable with gup_fast until the 2.4 brlock is added around it or similar) if it does the same thing but

Re: [PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Izik Eidus
Jonathan Corbet wrote: I don't claim to begin to really understand the deep VM side of this patch, but I can certainly pick nits as I work through it...sorry for the lack of anything more substantive. +static struct list_head slots; Some of these file-static variable names seem a

Solaris 10 x86_64 guest on kvm keeps restarting

2008-11-11 Thread mr ashok
Hi all, I have a F9 box with 2.6.27.4-58.fc10.x86_64 version installed with kvm-74-5.fc10.x86_64 installed. I have installed solaris 10 x86_64 , the installation went fine but after installation, the solaris 10 after the grub, where it starts the solaris, it again restarts. So the solaris guest

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Andrea Arcangeli
On Tue, Nov 11, 2008 at 03:31:18PM -0600, Christoph Lameter wrote: ksm need the pte inside the vma to point from anonymous page into filebacked page can migrate.c do it without changes? So change anonymous to filebacked page? Currently page migration assumes that the page will continue

Re: [PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Jonathan Corbet
On Wed, 12 Nov 2008 00:17:39 +0200 Izik Eidus [EMAIL PROTECTED] wrote: +static int ksm_dev_open(struct inode *inode, struct file *filp) +{ + try_module_get(THIS_MODULE); + return 0; +} + +static int ksm_dev_release(struct inode *inode, struct file *filp) +{ +

Re: [PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Izik Eidus
Jonathan Corbet wrote: On Wed, 12 Nov 2008 00:17:39 +0200 Izik Eidus [EMAIL PROTECTED] wrote: +static int ksm_dev_open(struct inode *inode, struct file *filp) +{ + try_module_get(THIS_MODULE); + return 0; +} + +static int ksm_dev_release(struct inode *inode, struct file *filp)

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Avi Kivity
Christoph Lameter wrote: On Tue, 11 Nov 2008, Avi Kivity wrote: Christoph Lameter wrote: page migration requires the page to be on the LRU. That could be changed if you have a different means of isolating a page from its page tables. Isn't rmap the means of isolating a page

Re: [PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Izik Eidus
Jonathan Corbet wrote: [Let's see if I can get through the rest without premature sends...] On Wed, 12 Nov 2008 00:17:39 +0200 Izik Eidus [EMAIL PROTECTED] wrote: Actually, it occurs to me that there's no sanity checks on any of the values passed in by ioctl(). What happens if the user

Re: [PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Valdis . Kletnieks
On Tue, 11 Nov 2008 15:03:45 MST, Jonathan Corbet said: +#define PAGECMP_OFFSET 128 +#define PAGEHASH_SIZE (PAGECMP_OFFSET ? PAGECMP_OFFSET : PAGE_SIZE) +/* hash the page */ +static void page_hash(struct page *page, unsigned char *digest) So is this really saying that you only hash the

Re: [PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Avi Kivity
Jonathan Corbet wrote: +static struct list_head slots; Some of these file-static variable names seem a little..terse... While ksm was written to be independent of a certain TLA-named kernel subsystem developed two rooms away, they share some naming... this refers to kvm 'memory

Re: [PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Avi Kivity
Izik Eidus wrote: Any benchmarks on the runtime cost of having KSM running? This one is problematic, ksm can take anything from 0% to 100% cpu its all depend on how fast you run it. it have 3 parameters: number of pages to scan before it go to sleep maximum number of pages to merge while we

Re: [PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Andrea Arcangeli
Hi Jonathan, On Tue, Nov 11, 2008 at 03:30:28PM -0700, Jonathan Corbet wrote: But it will fail in a totally silent and mysterious way. Doesn't it seem better to verify the values when you can return a meaningful error code to the caller? I think you're right, but just because find_extend_vma

Re: [PATCH 3/4] add ksm kernel shared memory driver

2008-11-11 Thread Izik Eidus
Jonathan Corbet wrote: What about things like cache effects from scanning all those pages? My guess is that, if you're trying to run dozens of Windows guests, cache usage is not at the top of your list of concerns, but I could be wrong. Usually am... Ok, ksm does make the cache of the

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Andrea Arcangeli
On Tue, Nov 11, 2008 at 04:30:22PM -0600, Christoph Lameter wrote: On Tue, 11 Nov 2008, Andrea Arcangeli wrote: this page_count check done with only the tree_lock won't prevent a task to start O_DIRECT after page_count has been read in the above line. If a thread starts O_DIRECT on the

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Andrea Arcangeli
On Wed, Nov 12, 2008 at 12:17:22AM +0100, Andrea Arcangeli wrote: We don't have to check the page_count vs mapcount later in replace_page because we know if anybody started an O_DIRECT read from disk, it would have triggered a cow, and the pte_same check that we have to do for other reasons

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Christoph Lameter
On Wed, 12 Nov 2008, Andrea Arcangeli wrote: O_DIRECT does not take a refcount on the page in order to prevent this? It definitely does, it's also the only thing it does. Then page migration will not occur because there is an unresolved reference. The whole point is that O_DIRECT can start

Re: [PATCH 1/1] KVM: Fix kernel allocated memory slot

2008-11-11 Thread Sheng Yang
On Tuesday 11 November 2008 22:58:25 Hollis Blanchard wrote: On Tue, 2008-11-11 at 15:30 +0800, Sheng Yang wrote: Commit 7fd49de9773fdcb7b75e823b21c1c5dc1e218c14 KVM: ensure that memslot userspace addresses are page-aligned broke kernel space allocated memory slot, for the userspace_addr is

Re: [PATCH 1/1] KVM: Fix kernel allocated memory slot

2008-11-11 Thread Anthony Liguori
Sheng Yang wrote: On Tuesday 11 November 2008 22:58:25 Hollis Blanchard wrote: On Tue, 2008-11-11 at 15:30 +0800, Sheng Yang wrote: Commit 7fd49de9773fdcb7b75e823b21c1c5dc1e218c14 KVM: ensure that memslot userspace addresses are page-aligned broke kernel space allocated memory slot,

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread KAMEZAWA Hiroyuki
On Tue, 11 Nov 2008 23:24:21 +0100 Andrea Arcangeli [EMAIL PROTECTED] wrote: On Tue, Nov 11, 2008 at 03:31:18PM -0600, Christoph Lameter wrote: ksm need the pte inside the vma to point from anonymous page into filebacked page can migrate.c do it without changes? So change

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Andrea Arcangeli
On Tue, Nov 11, 2008 at 06:27:09PM -0600, Christoph Lameter wrote: Then page migration will not occur because there is an unresolved reference. So are you checking if there's an unresolved reference only in the very place I just quoted in the previous email? If answer is yes: what should

kvm-78 - kernel panic after using system_reset except when using -no-kvm-irqchip

2008-11-11 Thread Charles Duffy
This happens every other use of system_reset -- ie. resetting the system using system_reset while in this panic'd state results in correct functionality. Following the suggestion and booting the guest with noapic results in other IRQ-related errors. The guest kernel is CentOS 5 2.6.18-53.el5

Re: [PATCH 2/4] Add replace_page(), change the mapping of pte from one page into another

2008-11-11 Thread Christoph Lameter
On Wed, 12 Nov 2008, Andrea Arcangeli wrote: So are you checking if there's an unresolved reference only in the very place I just quoted in the previous email? If answer is yes: what should prevent get_user_pages from running in parallel from another thread? get_user_pages will trigger a

Re: kvm-78 - kernel panic after using system_reset except when using -no-kvm-irqchip

2008-11-11 Thread Jan Kiszka
Charles Duffy wrote: This happens every other use of system_reset -- ie. resetting the system using system_reset while in this panic'd state results in correct functionality. Following the suggestion and booting the guest with noapic results in other IRQ-related errors. The guest kernel is

[PATCH] kvm: powerpc: add exit timing statistics v4

2008-11-11 Thread Christian Ehrhardt
From: Christian Ehrhardt [EMAIL PROTECTED] *update to v4* - EMUL_CORE no longer had more than wrtee emulation, therefore it now accounts for WRTEE in the output and set_exit_type calls are in the wrtee handlers to let any residual core op be counted as EMULINST *update to v3* - ensure build

Re: [PATCH] [v2] linux: virtio: Standardize virtio's concept of page size

2008-11-11 Thread Avi Kivity
Hollis Blanchard wrote: Avi, will you commit the matching qemu patch? (I'm not clear on the patch flow for kvm-userspace qemu virtio patches.) At this time, I'm accepting qemu/virtio patches (and will apply this one); once virtio is merged in qemu upstream, patches will have to go there

[PATCH] kvm: powerpc: add exit timing statistics v3

2008-11-11 Thread Christian Ehrhardt
From: Christian Ehrhardt [EMAIL PROTECTED] *update to v3* - ensure build time optimization when calling exit accouting functions using build time bug / constant check - migrate most of the exit timing code from powerpc.c and kvm_timing_stats.h to a separate exittiming.c file - renamed a lot

Re: [PATCH] kvm: powerpc: add exit timing statistics v4

2008-11-11 Thread Hollis Blanchard
On Tue, 2008-11-11 at 16:43 +0100, Christian Ehrhardt wrote: From: Christian Ehrhardt [EMAIL PROTECTED] *update to v4* - EMUL_CORE no longer had more than wrtee emulation, therefore it now accounts for WRTEE in the output and set_exit_type calls are in the wrtee handlers to let any

Re: [PATCH] kvm: powerpc: add exit timing statistics v3

2008-11-11 Thread Christian Ehrhardt
And btw - the wiki page is updated with new versions of the exittimings using all of our new memory management improvements. The page now also has some extended descriptions about the simple workloads used, holds the current version of the postprocessing script etc. Christian Ehrhardt wrote:

Re: [PATCH] [v2] powerpc/4xx: work around CHIP11 errata in a more PAGE_SIZE-friendly way

2008-11-11 Thread David Gibson
On Tue, Nov 11, 2008 at 07:52:18AM -0500, Josh Boyer wrote: On Mon, Nov 10, 2008 at 05:24:34PM -0600, Hollis Blanchard wrote: The current CHIP11 errata truncates the device tree memory node, and subtracts (hardcoded) 4096 bytes. This breaks kernels with larger PAGE_SIZE, since the bootmem

Re: [PATCH] [v3] powerpc/4xx: work around CHIP11 errata in a more PAGE_SIZE-friendly way

2008-11-11 Thread David Gibson
On Tue, Nov 11, 2008 at 06:06:46PM -0600, Hollis Blanchard wrote: The current CHIP11 errata truncates the device tree memory node, and subtracts (hardcoded) 4096 bytes. This breaks kernels with larger PAGE_SIZE, since the bootmem allocator assumes that total memory is a multiple of PAGE_SIZE.

Re: [PATCH] [v3] powerpc/4xx: work around CHIP11 errata in a more PAGE_SIZE-friendly way

2008-11-11 Thread Benjamin Herrenschmidt
On Tue, 2008-11-11 at 18:06 -0600, Hollis Blanchard wrote: The current CHIP11 errata truncates the device tree memory node, and subtracts (hardcoded) 4096 bytes. This breaks kernels with larger PAGE_SIZE, since the bootmem allocator assumes that total memory is a multiple of PAGE_SIZE.