Signed-off-by: Izik Eidus iei...@redhat.com
---
arch/x86/kvm/x86.c| 62 +---
include/linux/kvm_types.h |3 +-
2 files changed, 14 insertions(+), 51 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index c812209..29df564
Izik Eidus wrote:
Remove the vmap usage from kvm, this is needed both for ksm and
get_user_pages != write.
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
ציטוט Ryota OZAKI:
Hi Izik,
I've tried your patch set, but ksm doesn't work in my machine.
I compiled linux patched with the four patches and configured with KSM
and KVM enabled. After boot with the linux, I run two VMs running linux
using QEMU with a patch in your mail and started KSM scanner
ציטוט Izik Eidus:
ציטוט Ryota OZAKI:
Hi Izik,
I've tried your patch set, but ksm doesn't work in my machine.
I compiled linux patched with the four patches and configured with KSM
and KVM enabled. After boot with the linux, I run two VMs running linux
using QEMU with a patch in your mail
(From v1 to v2 the main change is much more documentation)
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.
another thread read
and writes to/from the first 512bytes of the page. We can lose
O_DIRECT reads, the very moment we mark any pte wrprotected...
Signed-off-by: Izik Eidus [EMAIL PROTECTED]
---
include/linux/rmap.h | 11
mm/rmap.c| 129
of this issue is that newpage cannot be anything but
kernel allocated page that is not swappable.
Signed-off-by: Izik Eidus [EMAIL PROTECTED]
---
include/linux/mm.h |5 +++
mm/memory.c| 80
2 files changed, 85 insertions(+), 0 deletions
of scanning
(so even if there are still more pages to scan,
we stop this iteration)
__u32 flags:
flags to control ksm scaning (right now just
ksm_control_flags_run
available)
Signed-off-by: Izik Eidus
.
(users of mmu_notifiers that didnt implement the set_pte_at_notify()
call back will just recive the mmu_notifier_invalidate_page callback)
Signed-off-by: Izik Eidus [EMAIL PROTECTED]
---
arch/x86/include/asm/kvm_host.h |1 +
arch/x86/kvm/mmu.c | 55
ציטוט KAMEZAWA Hiroyuki:
Thank you for answers.
On Wed, 12 Nov 2008 13:11:12 +0200
Izik Eidus [EMAIL PROTECTED] wrote:
Avi Kivity wrote:
KAMEZAWA Hiroyuki wrote:
Can I make a question ? (I'm working for memory cgroup.)
Now, we do charge to anonymous page when
- charge(+1
Avi Kivity wrote:
KAMEZAWA Hiroyuki wrote:
Can I make a question ? (I'm working for memory cgroup.)
Now, we do charge to anonymous page when
- charge(+1) when it's mapped firstly (mapcount 0-1)
- uncharge(-1) it's fully unmapped (mapcount 1-0) vir
page_remove_rmap().
My quesion is
-
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
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
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
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
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
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
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
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
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:
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:
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
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
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
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
Avi Kivity wrote:
LRU typically makes fairly bad decisions since it throws most of the
information it has away. I recommend looking up LRU-K and similar
algorithms, just to get a feel for this; it is basically the simplest
possible algorithm short of random selection.
Note that Linux doesn't
i have sent patch that remove the aliasing and i will resend it again
but untill then this patch should be applied as it fix kernel panic.
From 61a13744e2367572f3e27ab5c0cce6e080e94d67 Mon Sep 17 00:00:00 2001
From: Izik Eidus [EMAIL PROTECTED]
Date: Fri, 3 Oct 2008 17:40:32 +0300
Subject: [PATCH
Marcelo Tosatti wrote:
Hi Izik,
On Thu, Sep 04, 2008 at 05:13:20PM +0300, izik eidus wrote:
+ struct kvm_memory_slot *alias_slot = kvm-memslots[i];
+
+ if (alias_slot-base_gfn == slot-base_gfn)
+ return 1;
+ }
+ return 0
Marcelo Tosatti wrote:
Hi Izik,
On Thu, Sep 04, 2008 at 05:13:20PM +0300, izik eidus wrote:
+struct kvm_memory_slot *alias_slot = kvm-memslots[i];
+
+if (alias_slot-base_gfn == slot-base_gfn)
+return 1;
+}
+return 0;
+}
+
+static void update_alias_slots
that treated as not aliased.
Signed-off-by: Izik Eidus [EMAIL PROTECTED]
---
arch/ia64/include/asm/kvm_host.h |1 +
arch/ia64/kvm/kvm-ia64.c |5 --
arch/s390/include/asm/kvm_host.h |1 +
arch/s390/kvm/kvm-s390.c |5 --
arch/x86/kvm/mmu.c |5 +--
arch/x86
ציטוט Sukanto Ghosh:
Can anyone answer these queries regarding KSM ?
How does KSM offers its services through the /dev/ksm device ?
ioctls
Are every guest pages scanned in KVM while using KSM or page-scanning
and sharing is triggered on some event (low memory, etc) ?
no, the scanning
ציטוט Sukanto Ghosh:
Doesn't KSM notifies KVM about the shared pages so that KVM can update
its sptes accordingly or is it done by KSM itself ?
when using kvm, mmu notifiers is a must for ksm, (mmu notifiers update kvm
about the changes in the host page table)
What about KSM
ציטוט Sukanto Ghosh:
One more query, what if multiple processes call ioctl KSM_CREATE_SCAN
? Will there be multiple scanners ?
yes
Consider a scenario where two processes A B separately call
KSM_CREATE_SCAN and then start registering some memory pages/areas via
ציטוט Arn:
If I use the kernel function get_user_pages() within a guest
kernel module, will this ensure that the guests pages are never
swapped out by the host ? Will it lock these pages in memory ?
(Has anyone tried this ? )
As Izik said, the answer is no. Is this the desirable outcome,
101 - 135 of 135 matches
Mail list logo