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
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]
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
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
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]
---
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)
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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;
+
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
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.
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
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
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
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
+ *
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)
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
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.
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
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
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
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?
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
+{
+
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)
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
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
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
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
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
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:
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
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.
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.
79 matches
Mail list logo