Re: [PATCH 5/4] update ksm userspace interfaces

2009-04-03 Thread Izik Eidus
Gerd Hoffmann wrote: Izik Eidus wrote: 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 Did you test whenever it really cleans

Re: [PATCH 5/4] update ksm userspace interfaces

2009-04-03 Thread Gerd Hoffmann
Izik Eidus wrote: Gerd Hoffmann wrote: Did you test whenever it really cleans up in case you kill -9 qemu? I recently did something simliar with the result that the extra reference hold on mm_struct prevented the process memory from being zapped ... cheers, Gerd Did you use mmput()

Re: [PATCH 5/4] update ksm userspace interfaces

2009-04-03 Thread Chris Wright
* Gerd Hoffmann (kra...@redhat.com) wrote: mmput() call was in -release() callback, -release() in turn never was called because the kernel didn't zap the mappings because of the reference ... Don't have this issue. That mmput() is not tied to zapping mappings, rather zapping files. IOW, I

Re: [PATCH 5/4] update ksm userspace interfaces

2009-04-02 Thread Izik Eidus
Chris Wright wrote: * Anthony Liguori (anth...@codemonkey.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:

Re: [PATCH 5/4] update ksm userspace interfaces

2009-04-02 Thread Andrea Arcangeli
On Wed, Apr 01, 2009 at 10:31:14PM -0700, Chris Wright wrote: - 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 The unregister cleanup must happen at the vma level (with unregister when vma goes

Re: [PATCH 5/4] update ksm userspace interfaces

2009-04-02 Thread Chris Wright
* Andrea Arcangeli (aarca...@redhat.com) wrote: On Wed, Apr 01, 2009 at 10:31:14PM -0700, Chris Wright wrote: - 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 The unregister cleanup must

Re: [PATCH 5/4] update ksm userspace interfaces

2009-04-02 Thread Chris Wright
* Izik Eidus (iei...@redhat.com) wrote: Is this what we want? How about baby steps... admit that ioctl to control plane is better done via sysfs? -- 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

Re: [PATCH 5/4] update ksm userspace interfaces

2009-04-02 Thread Izik Eidus
Chris Wright wrote: * Izik Eidus (iei...@redhat.com) wrote: Is this what we want? How about baby steps... admit that ioctl to control plane is better done via sysfs? Yes -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

[PATCH 5/4] update ksm userspace interfaces

2009-04-01 Thread Chris Wright
* Anthony Liguori (anth...@codemonkey.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