[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49D4BE64.8020508@redhat.com>
Date: Thu, 02 Apr 2009 16:32:20 +0300
From: Izik Eidus <ieidus@...hat.com>
To: Chris Wright <chrisw@...hat.com>
CC: Anthony Liguori <anthony@...emonkey.ws>,
Andrea Arcangeli <aarcange@...hat.com>,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
linux-mm@...ck.org, avi@...hat.com, riel@...hat.com,
jeremy@...p.org, mtosatti@...hat.com, hugh@...itas.com,
corbet@....net, yaniv@...hat.com, dmonakhov@...nvz.org
Subject: Re: [PATCH 5/4] update ksm userspace interfaces
Chris Wright wrote:
> * Anthony Liguori (anthony@...emonkey.ws) wrote:
>
>> Using an interface like madvise() would force the issue to be dealt with
>> properly from the start :-)
>>
>
> Yeah, I'm not at all opposed to it.
>
> This updates to madvise for register and sysfs for control.
>
> madvise issues:
> - MADV_SHAREABLE
> - register only ATM, can add MADV_UNSHAREABLE to allow an app to proactively
> unregister, but need a cleanup when ->mm goes away via exit/exec
> - will register a region per vma, should probably push the whole thing
> into vma rather than keep [mm,addr,len] tuple in ksm
>
>
The main problem that ksm will face when removing the fd interface is:
right now when you register memory into ksm, you open fd, and then ksm
do get_task_mm(), we will do mmput when the file will be closed
(note that this doesnt mean that if you fork and not close the fd the
memory wont go away...., get_task_mm() doesnt protect the vmas inside
the mm strcture and therefore they will be able to get removed)
So if we move into madvice and we remove the get_task_mm() usage, we
will have to add notification to exit_mm() so ksm will know it should
stop using this mm strcture, and drop it from all the trees data...
Is this what we want?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists