linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Izik Eidus <ieidus@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	kvm@vger.kernel.org, avi@redhat.com, aarcange@redhat.com,
	chrisw@redhat.com, mtosatti@redhat.com, hugh@veritas.com
Subject: Re: [PATCH 5/5] add ksm kernel shared memory driver.
Date: Tue, 28 Apr 2009 02:12:00 +0300	[thread overview]
Message-ID: <49F63BC0.9090804@redhat.com> (raw)
In-Reply-To: <20090427153421.2682291f.akpm@linux-foundation.org>

Andrew Morton wrote:
> On Mon, 20 Apr 2009 04:36:06 +0300
> Izik Eidus <ieidus@redhat.com> wrote:
>
>   
>> 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.
>>     
>
> Breaks sparc64 and probably lots of other architectures:
>
> mm/ksm.c: In function `try_to_merge_two_pages_alloc':
> mm/ksm.c:697: error: `_PAGE_RW' undeclared (first use in this function)
>
> there should be an official arch-independent way of manipulating
> vma->vm_page_prot, but I'm not immediately finding it.
>   
Hi,

vm_get_page_prot() will probably do the work.

I will send you patch that fix it,
but first i am waiting for Andrea and Chris to say they are happy with 
small changes that i made to the api after conversation i had with them
(about checking if this api is robust enough so we wont have to change 
it later)

When i will get their acks, i will send you patch against this togather 
with the api (until then it is ok to just leave it only for x86)

changes are:
1) limiting the number of memory regions registered per file descriptor 
- so while (1){ (ioctl(KSM_REGISTER_MEMORY_REGION()) ) wont omm the host

2) checking if memory is overlap in registration (more effective to 
ignore such cases)

3) allow removing specific memoy regions inside fd.

Thanks.


> An alternative (and quite inferior) "fix" would be to disable ksm on
> architectures which don't implement _PAGE_RW.  That's most of them.
>
>   

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2009-04-27 23:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20  1:36 [PATCH 0/5] ksm - dynamic page sharing driver for linux v4 Izik Eidus
2009-04-20  1:36 ` [PATCH 1/5] MMU_NOTIFIERS: add set_pte_at_notify() Izik Eidus
2009-04-20  1:36   ` [PATCH 2/5] add get_pte(): helper function: fetching pte for va Izik Eidus
2009-04-20  1:36     ` [PATCH 3/5] add page_wrprotect(): write protecting page Izik Eidus
2009-04-20  1:36       ` [PATCH 4/5] add replace_page(): change the page pte is pointing to Izik Eidus
2009-04-20  1:36         ` [PATCH 5/5] add ksm kernel shared memory driver Izik Eidus
2009-04-20 10:02           ` Alan Cox
2009-04-20 11:11             ` Avi Kivity
2009-04-20 12:52               ` Izik Eidus
2009-04-27 22:34           ` Andrew Morton
2009-04-27 23:12             ` Izik Eidus [this message]
2009-04-30 17:46               ` Izik Eidus
2009-04-30 17:58                 ` Andrew Morton
2009-05-13 23:17           ` Andrew Morton
2009-05-13 23:25             ` Chris Wright
2009-05-14  0:14               ` Anthony Liguori
2009-05-14  0:11                 ` Izik Eidus
2009-05-14  0:15             ` Izik Eidus
2009-05-14  1:40               ` Tony Breeds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49F63BC0.9090804@redhat.com \
    --to=ieidus@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=avi@redhat.com \
    --cc=chrisw@redhat.com \
    --cc=hugh@veritas.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).